离线安装Supervisor

发布时间:2019-06-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了离线安装Supervisor脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

离线安装SuPErvisor

系统环境:redhat5.4/

由于需要安装meld组件,所以需要至少python2.6以上版本,于是我们先安装python2.6,然后再安装supervisor

下载supervisor安装包(链接: https://pan.baidu.com/s/1nuTl95f 密码: 9xd5)

一、升级Python版本到2.6

#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

二、安装supervisor

1.安装SETUPtools

#unzip setuptools-36.4.0.zip
#cd setuptools*
#python setup.py install

2.安装elementtree

#tar -xzvf elementtree-1.2.6-20050316.tar.gz
#cd elem*
#python setup.py install

3.安装meld

# tar -xzvf meld3-1.0.2.tar.gz
# cd meld*
#python setup.py install

4.安装Supervisor

#tar -xzvf supervisor-3.0a12.tar.gz
#cd supervisor*
#python setup.py install

三、配置supervisor

1.创建配置

#mkdir -p /etc/supervisor/conf.d
#echo_supervisord_conf > /etc/supervisord.conf

2.修改配置

[include]  
files = /etc/supervisor/conf.d/*.conf

配置表示包括/etc/supervisor/conf.d/的所有conf文件

3.创建配置(tomcat)

[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

4.启动suprvisor

#supervisord -c /etc/supervisord.conf

5.测试supervisor

杀死tomcat进程,查看是否进程自动重启以及日志情况

6.配置开机启动

将安装包中的supervisord文件拷到/etc/init.d/中

cp supervisord /etc/init.d/

加入开机启动

chkconfig --add supervisord

查看开机启动配置情况

chkconfig --list |grep supervisord

7.重启服务器测试

reboot

脚本宝典总结

以上是脚本宝典为你收集整理的离线安装Supervisor全部内容,希望文章能够帮你解决离线安装Supervisor所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。