码迷,mamicode.com
首页 > 编程语言 > 详细

随笔,CentOS 下 Python Web 环境的安装

时间:2016-06-09 23:43:26      阅读:759      评论:0      收藏:0      [点我收藏+]

标签:

1、下载Python 3.5.1源码
2、运行,yum -y install zlib zlib-devel openssl-devel
3、解压,运行 ./configure --prefix=/usr/local/python-3.5.1
4、make && make install
5、运行python -V,记住系统自带的python版本号
6、ln -fs /usr/local/python-3.5.1/bin/python3.5 /usr/bin/python
7、ln -fs /usr/local/python-3.5.1/bin/pip3 /usr/bin/pip
8、vim /usr/bin/yum 改掉前缀 /usr/bin/python2.7
9、vim /usr/libexec/urlgrabber-ext-down 改掉前缀 /usr/bin/python2.7
10、pip install flask sqlalchemy oss2 uwsgi
11、ln -fs /usr/local/python-3.5.1/bin/uwsgi /usr/bin/uwsgi
12、uwsgi /data/configure/uwsgi.ini

=================

附录:

[uwsgi]

socket = 127.0.0.1:9000
callable = app
master = true
enable-thread = true
workers = 2
vhost = true
vacuum = true
daemonize = /data/logger/uwsgi.log
py-autoreload = true

随笔,CentOS 下 Python Web 环境的安装

标签:

原文地址:http://www.cnblogs.com/cnmlgb/p/5572863.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!