學習筆記(08):【Python】第12周 Python自動化運維技術實訓(上)-服務器軟件安裝與管理2...

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

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章