-
ssh-keygen -R XXX.XXX.XXX.XXX
-
file zilla 上传company项目到/home
-
cd /home
-
apt install python3
-
apt-get install python3-venv
-
python3 -m venv venv
-
source venv/bin/activate && cd company
-
pip install –upgrade pip setuptools -i Go语言/ –trusted-host mirrors.aliyun.com
-
pip install -r requirements.txt -i Go语言/ –trusted-host mirrors.aliyun.com
-
首先得保证Django项目没有问题
python manage.py runserver 0.0.0.0:8001
uwsgi –http :8001 –plugin python –module company.wsgi
查看端口:netstat -ntlp //查看当前所有tcp端口·
杀掉uwsgi进行pkill -f uwsgi -9 -
apt-get install python3-dev
-
apt-get install gcc
-
pip install uwsgi
-
uwsgi –ini uwsgi.ini
-
ps ajx|grep uwsgi
-
uwsgi –stop uwsgi.pid
-
apt-get install nginx
-
nginx -v
-
find / -name nginx.conf
-
ip映射功能
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8000
22.更新html文件后,服务器端要执行以下命令才能刷新:
pkill -f uwsgi -9uwsgi --ini uwsgi.ini