因为之前一直用centos7 但是最近系统迁移变成了centos6.5
centos6.5 自带的是python2.6.6 和之前的centos7带的2.7.9不兼容
所以把python从2.6.6升级到了2.7.9
但是不知道为什么uwsgi一直用2.6.6的python。。着实让我蛋疼了一上午
最后重新编译了uwsgi让他加载了模块才搞定
大概如下

mkdir /data/uwsgi
cd /data/uwsgi
wget http://projects.unbit.it/downloads/uwsgi-2.0.11.tar.gz  
tar zxvf uwsgi-2.0.11.tar.gz  
cd uwsgi-2.0.11

在 buildconf/core.ini 文件中添加如下

plugin_dir = /data/uwsgi
bin_name = /usr/bin/uwsgi

编译uwsgi

python uwsgiconfig.py --build core  

编译 python2.7 版本的 plugins

python2.7 uwsgiconfig.py --plugin plugins/python core python27
uwsgi -d --emperor /data/www/uwsgi.ini --enable-threads
Comments
Write a Comment