使用uwsgi啟動django項目


 workon mycrm
  751  pip3 list
  752  pwd
  753  pip3 freeze > requirements.txt
  754  ls
  755  cat requirements.txt 
  756  deactivate
  757  mkvirtualenv nginx_crm
  758  pip3 list
  759  clear
  760  ls
  761  pip3 install -i http://pypi.douban.com/simple -r requirements.txt 
  762  pip3 install -i https://pypi.douban.com/simple -r requirements.txt 
  763  pip3 list
  764  pip3 install uwsgi
  765  pip3 list
  766  ls
  767  cd BBS
  768  ls
  769  cd BBS
  770  ls
  771  pwd
  772  cd /opt
  773  uwsgi --http:8088 --module BBS.wsgi
  774  uwsgi --http : 8088 --module BBS.wsgi
  775  uwsgi --http :8088 --module BBS.wsgi
  776  iptables -F
  777  uwsgi --http :8088 --module BBS.wsgi
  778  nginx
  779  uwsgi --http :8088 --module BBS.wsgi
  780  pkill nginx
  781  cd BBS
  782  ls
  783  uwsgi --http :8088 --module BBS.wsgi
  784  uwsgi --http :8088 --module BBS.wsgi --pypy -autoreload=1
  785  uwsgi --http :8088 --module BBS.wsgi --py -autoreload=1
  786  uwsgi --http :8088 --module BBS.wsgi --py-autoreload=1

 將uwsgi運行在后台的方式

#方式一
uwsgi --ini uwsgi.ini &
#方式二,在uwsgi.ini中寫入daemonize = uwsgi.log,就是將后台運行的日志寫入到uwsgi.log

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM