1.创建虚拟环境
mkvirtualenv env-name
2.进入虚拟环境
workon env-name
3.退出虚拟环境
deactivate
4.删除虚拟环境
rmvirtualenv env-name
5.在虚拟环境中安装uwsgi模块
pip install uwsgi
6.配置uwsgi.ini
[uwsgi]
socket = :8000
chdir = /usr/local/djangoprojects/pone
module = pone.wsgi
master = True
pidfile=/tmp/uwsgi.pid
processes = 2
vacuum=True
max-requests=5000
#restart use pid
touch-reload=/tmp/uwsgi.pid
7.uwsgi 启动、重启、停止
#启动:
uwsgi --ini uwsgi.ini
#重启:
uwsgi --reload /tmp/uwsgi.pid
#停止:
uwsgi --stop /tmp/uwsgi.pid