supervisor installation documentation

supervisor installation documentation


######################

Installation Requirements: The above python2.7 version

python2.6 upgrade:

1, download-2.7.15 Python
wget http://python.org/ftp/python/2.7.15/Python-2.7.15.tar.bz2

2, extract the
tar -jxvf Python-2.7.15.tar.bz2

. 3,
CD-2.7.3 the Python
# / Configure --prefix = / usr / local / python2.7.
#Make
#make the install

### Note: When installing installed zlib-devel zlib

. 4, establishing a soft connection of the system the default python pointing to python2.7
#mv / usr / bin / python /usr/bin/python2.6.6
#ln /usr/local/bin/python2.7 -s / usr / bin / python

5, modify yum
vi / usr / bin / yum

file header

#!/usr/bin/python

Changed to
#! / Usr / bin / python2.6

###################

Installation package python pkg: distribute-0.6.10.zip (python2.7)

distribute-0.6.10.zip #unzip
#python setup.py install


installation: supervisor

#yum install python-setuptools

#/usr/local/python2.7/bin/easy_install supervisor

/Usr/local/python2.7/bin default installation directory:

supervisord, echo_supervisord_conf, supervisorctl

Generate a configuration file:
# / echo_supervisord_conf> supervisord.conf.

Configuration files are as follows:

[tomcat@footballweb supervisor]$ cat supervisord.conf |grep -v ^\;

[unix_http_server]
file=/tmp/supervisor.sock ; the path to the socket file

[inet_http_server]; inet (TCP) Server Disabled by default
Port = 0.0.0.0: 39001; ip_address: Port specifier, *: All iface page for Port Management Address
username = huitou; default is no username (open server) - login name / password
password = huitou & 365; default is no password (open server)

[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 ; # of main logfile backups; 0 means none, default 10
loglevel=info ; log level; default info; others: debug,warn,trace
pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid
nodaemon=false ; start in foreground if true; default false
minfds=1024 ; min. avail startup file descriptors; default 1024
minprocs=200 ; min. avail process descriptors;default 200


[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface


[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
prompt=mysupervisor ; cmd line prompt (default "supervisor")
history_file=~/.sc_history ; use readline history if available

 

 

[Program: tomcat_8081]
Command = / opt / Apache Tomcat--7.0.81_8081 / bin / the catalina.sh RUN; program start command
environment = JAVA_HOME = "/ usr / java / jdk1.7.0_71", JAVA_BIN = "/ usr / Java / jdk1.7.0_71 / bin ", the LANG =" the zh_CN.GB18030 ";
Directory = / opt / Apache Tomcat--7.0.81_8081;
autostart = to true; supervisord automatically started when the start
startsecs = 20; 10 seconds active after no abnormal exit, it means that the process starts normally, the default is 1 second
autorestart = true; automatically restart after the program exits, [unexpected, true, false] , the default is unexpected, means that the process accidentally killed after the restart
startretries = 3; failed to start automatically retries, the default is 3
the user = Tomcat; to start the process with which the user, the default is the root
priority = 999; priority process starts, the default 999, the value of a small boot priority
redirect_stderr = true; redirect stderr to stdout default to false
stdout_logfile_maxbytes = 20MB; stdout log file size, default 50MB
stdout_logfile_backups = 20 is; stdout log file backup number, default is 10
= stdout_logfile / opt / Apache Tomcat--7.0.81_8081 / logs / supervisor_catalina.out;
stopasgroup = to true; default is false, when the process is killed, whether to send a signal to stop the process group including the child process
killasgroup = true; default , sending a signal to the process group to kill false, including a child process

 

supervisor start:

#./supervisord -c ./supervisord.conf

 


Guess you like

Origin www.cnblogs.com/wdrain/p/11528447.html