uwsgi怎么启动停止

https://www.cnblogs.com/cungen/p/4096907.html

简单的安装过程可以在这里找到,这里主要说一下如何配置uwsgi的服务,将uwsgi服务加入系统进程,你可以使用如下两种方式安装

apt-get

apt-get install uwsgi

该命令会自动将uwsgi安装为一个服务,在 /etc/init.d/uwsgi 下,你可以使用以下命令来管理该服务:

sudo /etc/init.d/uwsgi start|stop|restart|reload
sudo service uwsgi start|stop|restart|reload

pip(经测试不可行,最好还是用sudo apt-get install uwsgi)

pip install uwsgi

该命令会将uwsgi安装在 /usr/local/bin/uwsgi ,你需要手动添加服务,建立 /etc/ini/uwsgi.conf 文件,内容如下:

description "uWSGI Emperor"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec /usr/local/bin/uwsgi --emperor /etc/uwsgi/vassals/ --logto /var/log/uwsgi/uwsgi.log

然后你就可以通过如下的命令来管理uwsgi的进程了:

sudo initctl start|stop|restart|reload| uwsgi
sudo service uwsgi start|stop|restart|reload
原文地址:https://www.cnblogs.com/gcgc/p/10133541.html