CentOS7 配置 Nginx+Mysql+uWSGI+Django
第一次用CentOS7作服务器,要把项目转移过来。作为新手为了避免出错各版本还是用之前的。
-
Python 3.5.2
-
uWSGI 2.0.17
-
Django 1.11.7
-
nginx 1.10.2
-
Mysql 5.7.20
安装
Python
1.安装Python 的依赖包
yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
2.下载Python3.5的源码包并编译
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
tar xf Python-3.5.0.tgz
cd Python-3.5.0
./configure --prefix=/usr/local --enable-shared
make
make install
# 创建python3软链接
ln –s /usr/local/bin/python3 /usr/bin/python3
3.在运行Python之前需要配置库:<
版权声明:本文为xidianwwy原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。