立即学习:https://edu.csdn.net/course/play/8578/176536?utm_source=blogtoedu
apt update
apt install python3
apt install python3-pip
pip3 install django
django-admin startproject demo
cd demo
vi demo/settings.py
注意: uwsgi写在开机运行脚本时候要用uwsgi的绝对路径
which uwsgi 查找绝对路径
pip3 install uwsgi
uwsgi --http :80 --chdir /root/demo --module demo.uwsgi(demo项目下的uwsgi) -- daemonize /var/log.log(以服务的形势运行,不会占用终端)
pkill -9 父进程的pid
开机启动添加
vi /etc/rc.local