立即學習: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