1.安装uwsgi工具
pip3 install -i https://pypi.douban.com/simple uwsgi
2.编写uwsgi.ini配置文件,以多进程形式启动tf_crm
touch uwsgi.ini
[uwsgi]
chdir = /opt/tf_crm/
module = tf_crm.wsgi
home = /opt/tf_crm/venv_crm
master = true
processes = 3
http = 0.0.0.0:8000
vacuum = true
3.此时可以用命令,基于uwsgi协议的一个高性能web后端启动了
uwsgi --ini ./uwsgi.ini