0
点赞
收藏
分享

微信扫一扫

centos7+nginx+uwsgi+python3.7.4+django部署实践

野见 2023-02-07 阅读 129

yum install python3
yum install python3-devel
yum -y install gcc gcc-c++
pip3 install uwsgi

python3 ​​manage.py​​ runserver 10.5.1.65:82

uwsgi --ini uwsgi.ini
netstat -ntpl

[uwsgi]

指定项目的目录

chdir = /f1

指定项目的application

module=f1.wsgi:application

开启的进程数量

workers=4

指定IP端口

http=10.5.1.65:8081

启动uwsgi用户名

uid=root

启动uwsgi用户组

gid=root

启用主进程

master=true

当服务器退出的时候自动清理环境,删除socket文件和pid文件

vacuum=true

序列化接受的内容,如果可能的话

thunder-lock=true

启用线程

enable-threads=true

设置自动中断时间

harakiri=60

设置缓冲

post-buffering=4096

修改自动重启

py-autoreload=1

指定静态目录

指定pid路径

pidfile=/f1/uwsgi.pid

指定sock路径

socket=/f1/uwsgi.sock

设置log路径

daemonize=/f1/uwsgi.log

举报

相关推荐

0 条评论