标签:iso a.out var centos usr min ace 增加 pytho
centos 7.xx
1、#yum install python-setuptools
2、#easy_install supervisor
3、# vim /etc/supervisord.conf
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
minfds=65530
minprocs=65530
user=root
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:////var/run/supervisor.sock ; use a unix:// URL for a unix socket
[include]
files = supervisord.d/*.ini
4、#mkdir -p /etc/supervisord.d
5、#vim /etc/supervisord.d/xalgo-8080.ini
[supervisord]
minfds=65530
minprocs=32768
[program:xalgo-8080] ##项目名称,每个项目不一样
command=/data/tomcats/xalgo-8080/bin/catalina.sh run ###项目启动路径,每个项目不一样
environment=JAVA_HOME="/usr/local/java/",JAVA_BIN="/usr/local/java/bin"
numprocs=1
stopsignal=INT
directory=/data/tomcats/xalgo-8080 ###我们不一样
user=www
redirect_stderr=true
#stdout_logfile=/data/log/catalina.out
stdout_logfile=/tmp/catalina-supervisor.out
stdout_logfile_maxbytes=100MB
stdout_logfile_backups=10
stopasgroup=true
killasgroup=true
6、启动服务:
#supervisord -c /etc/supervisord.conf
7、增加启动项,
#vim /etc/rc.local
supervisord -c /etc/supervisord.conf
8、维护命令
#supervisorctl update #更新配置
#supervisorctl status #查看当前服务状态
#supervisorctl start|restart|stop xxx ##启动|重启|停止 某个服务
#supervisorctl start|restart|stop all ##启动|重启|停止所有服务
标签:iso a.out var centos usr min ace 增加 pytho
原文地址:https://www.cnblogs.com/Qing-840/p/9595680.html