返回

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

发布时间:2023-02-14 12:36:18 298
# python# c++# 服务器# 服务器

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)
按点赞数排序
用户头像
精选文章
thumb 中国研究员首次曝光美国国安局顶级后门—“方程式组织”
thumb 俄乌线上战争,网络攻击弥漫着数字硝烟
thumb 从网络安全角度了解俄罗斯入侵乌克兰的相关事件时间线
下一篇
Python海象运算符的使用 2023-02-14 12:13:30