qitong 2019-06-25
系统环境:redhat5.4/
由于需要安装meld组件,所以需要至少python2.6以上版本,于是我们先安装python2.6,然后再安装supervisor
下载supervisor安装包(链接: https://pan.baidu.com/s/1nuTl95f 密码: 9xd5)
#tar jxvf Python-2.6.6.tar.bz2 #cd Python-2.6.6. #./configure #make all #make install #make clean #make distclean #mv /usr/bin/python /usr/bin/python2.4 #ln -s /usr/local/bin/python2.6 /usr/bin/python #python -V
#unzip setuptools-36.4.0.zip #cd setuptools* #python setup.py install
#tar -xzvf elementtree-1.2.6-20050316.tar.gz #cd elem* #python setup.py install
# tar -xzvf meld3-1.0.2.tar.gz # cd meld* #python setup.py install
#tar -xzvf supervisor-3.0a12.tar.gz #cd supervisor* #python setup.py install
#mkdir -p /etc/supervisor/conf.d #echo_supervisord_conf > /etc/supervisord.conf
[include] files = /etc/supervisor/conf.d/*.conf
配置表示包括/etc/supervisor/conf.d/的所有conf文件
[program:tomcat] command=/opt/apache-tomcat-8.0.35/bin/catalina.sh run stdout_logfile=/opt/apache-tomcat-8.0.35/logs/catalina.out autostart=true autorestart=true user=app startsecs=5 priority=1 stopasgroup=true killasgroup=true
#supervisord -c /etc/supervisord.conf
杀死tomcat进程,查看是否进程自动重启以及日志情况
将安装包中的supervisord文件拷到/etc/init.d/中
cp supervisord /etc/init.d/
加入开机启动
chkconfig --add supervisord
查看开机启动配置情况
chkconfig --list |grep supervisord
reboot