Gunicorn运行Python的网站真是非常简单了,这里介绍下django如何使用,和apache复杂配置相比,这个配置少得真不是一个数量级。
首先在unix下通过easy_install 安装Gunicorn:
$ easy_install gunicorn
然后在你的django工程下面运行:
$ gunicorn_django [OPTIONS] [SETTINGS_PATH]如:
$ cd path/to/yourdjangoproject
$ gunicorn_django --workers=2
或者修改setting.py文件:
INSTALLED_APPS = (
...
"gunicorn",
)
然后运行:
python manage.py run_gunicorn简单得令人难以置信吧。
最关键是简单,而且性能很好!
Gunicorn 的详细介绍:请点这里
Gunicorn 的下载地址:请点这里
相关阅读:
使用Gunicorn部署web.py应用 http://www.linuxidc.com/Linux/2014-01/95075.htm
Gunicorn运行Python的网站非常简单 http://www.linuxidc.com/Linux/2014-01/95076.htm
