1.查询当前进程:
ps -ef
2.结束当前进程:
kill -9 [进程id]
3.复制并重命名:
cp eth.html eth2.html
4.激活Python虚拟环境:
source ven/bin/activate
5.修改默认的nginx配置:
vim /etc/nginx/conf.d/default.conf
6.重启nginx:
service nginx restart
7.启动nginx:
service nginx start
8.后台运行uwsgi:
必须在uwsgiconfig.ini配置文件目录下运行
nohup uwsgi uwsgiconfig.ini &
9.下载python 3.6.3:
wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz
10.安装zlib-dev openssl-devel 等:
yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel
11.安装groupinstall 'Development Tools' 等:
yum groupinstall 'Development Tools'
12.解压python-3,6,3,tar,xz
tar xJf Python-3.6.3.tar.xz
13.安装python3.6.3
./configure --prefix=/usr/local/python3 && make && make install
14.配置python3.6.3
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
15.配置python3.6.3 pip
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
16.安装虚拟环境
pip3 install virtualenv
17.创建目录
mkdir ethapi
18.安装虚拟环境
/usr/local/python3/bin/virtualenv -p /usr/bin/python3 ven
ll
18.安装flask
pip install flask
19.创建文件
touch index.py
20.在虚拟环境下安装gunicorn
pip install gunicorn
21.使用gunicorn运行flask
gunicorn --workers=3 index:app -b 127.0.0.1:8080
22.从github获取代码
git clone [git地址]
23.安装uwsgi
pip install uwsgi
24.安装uwsgi
pip install uwsgi
25.查看当前目录路径
pwd
26.非后台启动uwsgi
uwsgi uwsgiconfig.ini