官方文档中介绍了supervisor离线安装与在线安装两种方式。在线安装比较简单,此文仅介绍离线安装方式
http://supervisord.org/installing.html#installing-to-a-system-without-internet-access
If the system that you want to install Supervisor to does not have Internet access, you’ll need to perform installation slightly differently. Since both pip and python setup.py install depend on internet access to perform downloads of dependent software, neither will work on machines without internet access until dependencies are installed. To install to a machine which is not internet-connected, obtain the following dependencies on a machine which is internet-connected:
setuptools (latest) from https://pypi.org/pypi/setuptools/.
Copy these files to removable media and put them on the target machine. Install each onto the target machine as per its instructions. This typically just means unpacking each file and invoking python setup.py install in the unpacked directory. Finally, run supervisor’s python setup.py install.
Note:
Depending on the permissions of your system’s Python, you might need to be the root user to invoke python setup.py install successfully for each package.
注1:本文环境基础为:Centos7.6 + python2.7.5 + setuptools 41.1.0 + supervisor 4.0.4
注2:python、setuptools以及supervisor的版本是有版本兼容要求的
https://pypi.org/project/setuptools/41.1.0/#files
获取压缩包setuptools-41.1.0.zip,通过命令unzip setuptools-41.1.0.zip解压到本地,进入解压后的文件夹中,通过命令python setup.py install安装setuptools工具,如下,即为安装完成后的末尾输出
......
Installed /usr/lib/python2.7/site-packages/setuptools-41.1.0-py2.7.egg
Processing dependencies for setuptools==41.1.0
Finished processing dependencies for setuptools==41.1.0
[root@vincent setuptools-41.1.0]#
至此,setuptools安装完毕
注意:需要考虑本地python版本与setuptools的版本兼容性
https://pypi.org/project/supervisor/4.0.4/
获取压缩包supervisor-4.0.4.tar.gz,通过命令tar zxvf supervisor-4.0.4.tar.gz解压到本地,进入解压后的文件夹中,通过命令python setup.py install安装setuptools工具,如下,即为安装完成后的末尾输出
......
Installed /usr/lib/python2.7/site-packages/supervisor-4.0.4-py2.7.egg
Processing dependencies for supervisor==4.0.4
Searching for meld3>=1.0.0
Reading http://mirrors.tencentyun.com/pypi/simple/meld3/
Best match: meld3 2.0.1
Downloading http://mirrors.tencentyun.com/pypi/packages/53/af/5b8b67d04a36980de03505446d35db39c7b2a01b9bac1cb673434769ddb8/meld3-2.0.1.tar.gz#sha256=3ea266994f1aa83507679a67b493b852c232a7905e29440a6b868558cad5e775
Processing meld3-2.0.1.tar.gz
Writing /tmp/easy_install-4Xupfl/meld3-2.0.1/setup.cfg
Running meld3-2.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-4Xupfl/meld3-2.0.1/egg-dist-tmp-9W1497
zip_safe flag not set; analyzing archive contents...
Adding meld3 2.0.1 to easy-install.pth file
Installed /usr/lib/python2.7/site-packages/meld3-2.0.1-py2.7.egg
Finished processing dependencies for supervisor==4.0.4
[root@vincent supervisor-4.0.4]#
通过如下命令可查看当前supervisor的版本信息
[root@vincent ~]# /usr/bin/supervisord -v
4.0.4
[root@vincent ~]#
至此,supervisor离线安装完毕
注意:需要考虑本地python版本、setuptools版本与supervisor的兼容性