/images/avatar1.jpeg

CentOS下kvm安装

注:运行kvm保证机器支持虚拟化且在bios中开启。 准备工作 清除iptables规则 1 2 3 4 # CentOS6 service iptables stop; service iptables save # CentOS7 systemctl stop firewalld 关闭selinux 1 2

搭建lnmp环境

lnmp即:nginx + mysql + php。与lamp不同的是,lnmp的php不在只是httpd中的一个库,lnmp架构中php作为一个服务,专门

搭建lamp环境

lamp即 apache + mysql + php,是互联网常用架构。 要注意的是php依赖apache和mysql,所以要最后安装。系统环境为CentOS6.5 安装m

python装饰器

简单的装饰器函数: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 import time from functools import wraps def timethis(func): """ Decorator that reports the execution time. """ @wraps(func) def wrapper(*args, **kwargs): start = time.time() result = func(*args, **kwargs) end = time.time() print(func.__name__, end-start) return result return wrapper 函数的功能很简单,就

Flask与Vue的token认证

后端使用flask设计基于token认证方式的restful接口,前端使用vue.js全家桶,利用axios通讯。 感谢两篇文章的作者: http://www.cnblogs.com/vovlie/p/4182814.html https://segmentfault.com/a/1190000008383094?_ea=1639495 源

1 2 3 4 5 6 7 8 9 10 cat <<EOF > /etc/apt/sources.list deb http://cn.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse EOF 1 apt-get install -y ubiquity ubiquity-casper ubiquity-frontend-gtk ubiquity-slideshow-ubuntu ubiquity-ubuntu-artwork 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 apt-get install -y \ sudo \ ubuntu-server \ casper \ ubiquity-casper \ discover \ laptop-detect \ os-prober \ network-manager \ resolvconf \ net-tools \ wireless-tools \ locales \ grub-common \ grub-gfxpayload-lists \ grub-pc \ grub-pc-bin \ grub2-common