# 運行程序報錯
/usr/bin/python /usr/bin/supervisord -c /etc/supervisor/supervisord.conf -u apache
[root@eus_influenex_web01:/usr/local/php]# /usr/bin/python /usr/bin/supervisord -c /etc/supervisor/supervisord.conf -u apache
/usr/lib/python2.7/site-packages/supervisor/options.py:383: PkgResourcesDeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
return pkg_resources.EntryPoint.parse("x="+spec).load(False)
# 需要安裝supervisor 3.2 以上的版本,刪除原有版本 rpm -e supervisor3.1.4
cd /usr/lib/python2.7/site-packages/
wget https://github.com/Supervisor/supervisor/archive/3.3.5.tar.gz
tar xf 3.3.5.tar.gz
cd supervisor-3.3.5/
# 發現/usr/bin/supervisord的版本還是3.1.4,刪除這個可執行程序,重新運行安裝即可
python setup.py install
安裝的時候報警處理方式
[root@eus_influenex_web03:~]# cat /usr/lib/python2.7/site-packages/pkg_resources/py2_warn.py
import sys
import warnings
import textwrap
msg = textwrap.dedent("""
You are running Setuptools on Python 2, which is no longer
supported and
>>> SETUPTOOLS WILL STOP WORKING <<<
in a subsequent release (no sooner than 2020-04-20).
Please ensure you are installing
Setuptools using pip 9.x or later or pin to `setuptools<45`
in your environment.
If you have done those things and are still encountering
this message, please comment in
https://github.com/pypa/setuptools/issues/1458
about the steps that led to this unsupported combination.
""")
pre = "Setuptools will stop working on Python 2\n"
# 注釋掉這行
#sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60)
# 添加systemd管理進程的配置
# 修改supervisord的配置
# vim /etc/supervisord.conf
nodaemon=false
修改為
nodaemon=true
# vim /etc/systemd/system/supervisord.service
[Unit] Description=Supervisor daemon [Service] ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf ExecStop=/usr/bin/supervisorctl $OPTIONS shutdown ExecReload=/usr/bin/supervisorctl $OPTIONS reload KillMode=process Restart=on-failure RestartSec=42s [Install] WantedBy=multi-user.target