django - meetbill/op_practice_book GitHub Wiki

部署uWSGI

环境

CentOS 7.3

开发环境生产uWSGI可执行文件

$yum install python-devel
$yum install gcc
$curl http://uwsgi.it/install | bash -s default /tmp/uwsgi

这将会把uWSGI二进制安装到 /tmp/uwsgi

测试

在你的机器上写一个test.py

# test.py
def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return "Hello World"

然后执行shell命令:

uwsgi --http :8001 --wsgi-file test.py

访问网页:

http://IP:8001/

看在网页上是否有Hello World

python2.6升级到2.7使用高版本django

注意事项