Django部署在阿里云服务器上

1.ubuntu上安装必要的环境

  安装python3.6

sudo apt-get update
sudo apt-get install python3.6

#调整优先级
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
sudo update-alternatives --config python3

#or
cd /usr/bin
rm python
ln -s python3.6m python

  安装django

sudo apt-get update

2.Uwsgi的使用

#install
pip install uwsgi
#or
pip install https://projects.unbit.it/downloads/uwsgi-lts.tar.gz

  测试

ls
mkdir uwsgi
mv uwsgi uwsgi_test
cd uwsgi_test/
ls
vim test.py

 

猜你喜欢

转载自www.cnblogs.com/taoyucheng/p/10549158.html
0条评论
添加一条新回复