Centos7 django+uwsgi+nginx+python3.6.8部署

Posted ianduin

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos7 django+uwsgi+nginx+python3.6.8部署相关的知识,希望对你有一定的参考价值。

安装依赖

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make

下载python安装包

https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz

安装niginx yum源

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

 

安装nginx

yum install -y nginx

开放80端口

firewall-cmd --zone=public --add-port=80/tcp --permanent

重启防火墙

firewall-cmd --reload

安装python

tar -zxvf Python-3.6.8.tgz

cd Python-3.6.8

./configure --prefix=/usr/local/python36 && make && make install

ln -s /usr/local/python36/bin/python3.6 /usr/bin/python3

ln -s /usr/local/python36/bin/pip3.6 /usr/bin/pip3

 

pip3 install virtualenv

ln -s /usr/local/python36/bin/virtualenv /usr/bin/virtualenv3

 





以上是关于Centos7 django+uwsgi+nginx+python3.6.8部署的主要内容,如果未能解决你的问题,请参考以下文章

centos7下采用Nginx+uwsgi来部署django

Centos7部署Django+Uwsgi+Nginx环境

阿里云 centos7 django + uWSGI+Nginx + python3 部署攻略

centos7下部署Django(nginx+uwsgi+django+python3)

[linux]centos7.4部署django+Uwsgi+Nginx

CentOS7 + Python3 + Django(rest_framework) + MySQL + nginx + uwsgi 部署 API 开发环境, 记坑篇