本文主要是介绍安装uwsgi(转),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
- 获取uwsgi;目前最新版本是2.0.11.1
wget http://projects.unbit.it/downloads/uwsgi-latest.tar.gz
- 编译安装;我是用python 2.7.6 编译的
tar zxvf uwsgi-latest.tar.gz
cd uwsgi-2.0.11.1/
python uwsgiconfig.py --build
python setup.py install
- 测试uwsgi是否正常
新建test.py:
def application(env, start_response): start_response('200 OK', [('Content-Type','text/html')]) return "Hello World"在终端运行:uwsgi --http :8001 --wsgi-file test.py
通过浏览器访问:http://:8001,看看页面是否有“Hello World”输出。
这篇关于安装uwsgi(转)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!