CentOS7部署Django專案(1)

2021-10-06 03:22:26 字數 1436 閱讀 9876

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc* make -y
wget
tar -zxvf python-3.6.8.tgz
切換到解壓目錄下

./configure --prefix=/usr/local/python3
make && make install
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
出現modulenotfounderror: no module named '_ctypes』的錯誤,需要安裝python3-devel

yum install python3-devel
然後再安裝uwsgi

pip3 install uwsgi -i
pip freeze > requirement.txt
pip3 install -r requirement.txt -i
進入到django專案目錄下

uwsgi --http :8000 --module 專案名.wsgi
也可以在根目下新建uwsgi.ini檔案,並填寫以下內容

#專案目錄

chdir = /home/report

#專案目錄名

wsgi-file = report/wsgi.py

# maximum number of worker processes

processes=4

threads=2

daemonize: /tmp/uwsgi.log

pidfile: /tmp/uwsgi.pid

disable-logging : true

vacuum = true

# 設定自中斷時間

harakiri = 300

# 設定緩衝

post-buffering = 6553600

http-timeout = 600然後執行

uwsgi --ini uwsgi.ini

CentOS7部署過程

接著的是 從零開始vcs verdi 安裝及破解過程 centos7 完整的部署硬體設計 環境,以搭建pulpino的全流程 一般linux最小化安裝時,wget不會預設被安裝 yum安裝 yum y install wget即可安裝 首先備份 etc yum.repos.d centos base...

CentOS7部署vsftpd服務

vsftp安裝 建立使用者 並限定使用者在自己的目錄 1 檢視是否已經安裝了vsftpd vsftpd version 2 安裝vsftpd centos7 yum install y vsftpd 3 新建ftp目錄 建立的ftp目錄如下 data kodserver data user toma...

CentOS7部署VNC服務

1 切換到root使用者,執行yum groupinstall x window system 2 執行yum install gnome classic session gnome terminal nautilus open terminal control center liberation ...