安装uwsgi与yum或pip有什么区别?

安装uwsgi与yum或pip有什么区别?,pip,uwsgi,yum,Pip,Uwsgi,Yum,我正在写一些烧瓶程序。为了在nginx上部署它,我使用uwsgi来完成 首先,flask程序将有如下代码: app,host,port = myFun() 然后我有一个名为api.ini的wsgi配置文件,内容如下(我省略了一些信息): api_uwsgi是我的python文件生成应用程序 在此之后,我使用下面的命令行运行uwsgi uwsgi --ini apid.ini 但问题是uwsig是否由yum安装。日志如下所示: *** Starting uWSGI 2.0.12 (64bit)

我正在写一些烧瓶程序。为了在nginx上部署它,我使用uwsgi来完成

首先,flask程序将有如下代码:

app,host,port = myFun()
然后我有一个名为api.ini的wsgi配置文件,内容如下(我省略了一些信息):

api_uwsgi是我的python文件生成应用程序

在此之后,我使用下面的命令行运行uwsgi

uwsgi --ini apid.ini
但问题是uwsig是否由yum安装。日志如下所示:

*** Starting uWSGI 2.0.12 (64bit) on [Mon Apr 11 13:57:30 2016] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-4) on 02 January 2016 19:52:54
os: Linux-3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016
nodename: ES01
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /opt/flow/etc/uwsgi
detected binary path: /usr/sbin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
chdir() to ../../bin/
your processes number limit is 63466
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:8001 fd 3
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 518400 bytes (506 KB) for 16 cores
*** Operational MODE: preforking+threaded ***
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 28611)
spawned uWSGI worker 1 (pid: 28615, cores: 4)
spawned uWSGI worker 2 (pid: 28618, cores: 4)
spawned uWSGI worker 3 (pid: 28622, cores: 4)
spawned uWSGI worker 4 (pid: 28624, cores: 4)
*** Stats server enabled on 127.0.0.1:9191 fd: 15 ***
没有应用程序加载


使用pip安装uwsgi,这将是罚款和版本的uwsgi是相同的。为什么?

不同之处在于,当您从yum、apt或使用的任何包管理器安装时,发行版的uwsgi包是,因此它不会安装python插件。但是从pip安装,它对python是这样做的,因为它毕竟是python的包管理器

如果从yum(
yum install uwsgi
)安装以使其正常工作,则还需要安装python插件:

yum安装uwsgi插件python

然后在uwsgi命令中,应该传递
--plugin=python

*** Starting uWSGI 2.0.12 (64bit) on [Mon Apr 11 13:57:30 2016] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-4) on 02 January 2016 19:52:54
os: Linux-3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016
nodename: ES01
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /opt/flow/etc/uwsgi
detected binary path: /usr/sbin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
chdir() to ../../bin/
your processes number limit is 63466
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:8001 fd 3
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 518400 bytes (506 KB) for 16 cores
*** Operational MODE: preforking+threaded ***
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 28611)
spawned uWSGI worker 1 (pid: 28615, cores: 4)
spawned uWSGI worker 2 (pid: 28618, cores: 4)
spawned uWSGI worker 3 (pid: 28622, cores: 4)
spawned uWSGI worker 4 (pid: 28624, cores: 4)
*** Stats server enabled on 127.0.0.1:9191 fd: 15 ***