UWSGI安装

一、安装python-devel

yum -y install python-devel

image

二、安装UWSGI

pip install uwsgi

image

三、测试项目

uwsgi --module one.wsgi --http 0.0.0.0:80

image

image

四、测试结果

访问http://192.168.129.4/index

image

问题汇总:

问题一:

Commad “/usr/bin/python -c "import setuptools,tokenize;__file__='/tmp/pip-build-dtpfv6/uwsgi/setup.py';exec(compile(getattr(tokenize,'open',open)(__file__).read().replace('\r\n','\n'),__file__,'exec'))" install --record /tmp/pip-pYPmC6-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-dtpfv6/uwsgi

解决方法:

yum -y install python-devel


注意事项:

1. 项目发布时,需要关闭SELINUX

2. 防火墙策略需要设置或关闭防火墙


二〇一八年一月二十一日 12:16:20


THE END