当前位置:网站首页>Supervisor deployment (offline deployment requires downloading the deployment package in advance)
Supervisor deployment (offline deployment requires downloading the deployment package in advance)
2022-07-25 10:23:00 【Puffiness is also strong】
1. Software preparation
download tar package :wget https://pypi.python.org/packages/source/s/supervisor/supervisor-3.1.3.tar.gz
decompression :tar -xvf supervisor-3.1.3.tar.gz
Enter the decompression package :cd supervisor-3.1.3
Start installation :python setup.py install
download meld3 Deployment package :wget https://pypi.python.org/packages/source/m/meld3/meld3-1.0.2.tar.gz
decompression :tar -xvf meld3-1.0.2.tar.gz
Enter the decompression package :cd meld3-1.0.1.tar.gz
Start installation :python setup.py install
Linux CentOS7 7.6_1810
link :https://pan.baidu.com/s/1NV4MjfORIj290Q3scy6iYQ?pwd=pzse
Extraction code :pzse
Mind mapping tools
https://mubu.com/inv/12356104
free , Succinct can be “ Mind mapping ” Copy and paste the article to get a mind map ( No joy, no spray. )
Mind mapping tools
free , Succinct can be “ Mind mapping ” Copy and paste the article to get a mind map ( No joy, no spray. )

2. Test and reset the configuration file
test supervisor:echo_supervisord_conf

Create directory :mkdir /yunwei/supervisor
Enter this directory to create a subdirectory :cd /yunwei/supervisor
mkdir conf( This folder is used to store supervisor The target of hosting service is supervisor Configuration file for )
mkdir logs( This document is for storage supervisor journal )
mkdir pid
mkdir socket
supervisor Service hosting , You need to point to the hosting service for supervisor Configuration file for , And this document needs to be connected with supervisor The configuration file of
Get into conf Folder :cd conf
create a file :mkdir supervisor.d( This folder is used to store supervisor Configuration file for )
establish supervisor The configuration file points to supervisor.d Folder :
echo_supervisord_conf > /yunwei/supervisor/conf/supervisor.d/supervisord.conf
start-up supervisor:
/usr/bin/python2 /usr/bin/supervisord -c /yunwei/supervisor/conf/supervisor.d/supervisord.conf
modify supervisord.conf The configuration file :
[unix_http_server] This configuration item is enabled http service
file Need to point to socket In file supervisor.sock file
( Need to be in socket Create the file in the folder :touch supervisor.sock)

[inet_http_server] This configuration item is enabled web Page services
If there are notes , Cancel the comment , User and password can be customized

[supervisord] The configuration item is supervisor The configuration file
logfile Need to point to logs in supervisord.log file ( This file needs to be created )
pidfile Need to point to pid in supervisord.pid file ( You need to create a modification file )

[supervisorctl] The configuration item is socket File configuration
serverurl Need to point to socket in supervisor.sock file ( Change the file to report missing more , Sometimes you need to create , Sometimes there is no need to create )

[include] The configuration item is supervisor Used to configure supervisor Regulatory services Basic configuration ( By identifying the configuration file , Give Way supervisor Services are linked to regulatory services )
files Need to point to conf All of the *.conf file

In a formal development environment , How many regulatory services are there ,conf How many corresponding configuration files are there in the file
Supervision service configuration
Here to tomcat For example
Entry directory :cd /yunwei/supervisor/conf
create profile :touch tomcat.conf
The new content :
[program:tomcat]
command=/yunwei/tomcat/bin/catalina.sh run
environment=JAVA_HOME="/yunwei/jdk",JAVA_BIN="/yunwei/jdk/bin"
directory=/yunwei/tomcat
user=root
autostart = true
autorestart=true
redirect_stderr=true
stderr_logfile=/yunwei/supervisor/logs/tomcat.log/tomcat.err.log
stdout_logfile=/yunwei/supervisor/logs/tomcat.log/tomcat.out.log

[program:tomcat]: Define the name of the regulatory service
command: Define how to start the regulatory service 、 And instructions
environment: Definition tomcat Dependence
directory: Definition tomcat The path of
user: Define startup tomcat The account of
autostart: Define auto start
autorestart: Define automatic restart
redirect_stderr: hold stderr Redirect
priority=999:# Process startup priority , Default 999, If Supervisord Need to manage multiple processes , Then the low value starts first
stderr_logfile: The error log output needs to point to the log file ( If there is no need to create this file )
stdout_logfile: The output log needs to point to the log file ( If there is no need to create this file )
stdout_logfile_maxbytes=200MB #stdout Standard output log file size , Log file size to 200M After that, it will be cut , The log file after cutting will be marked as catalina.out1,catalina.out2,catalina.out3..., Default 50MB
stdout_logfile_backups = 100 #stdout Number of standard output log file backups , preservation 100 individual 200MB Log file , exceed 100 The old ones will be deleted after one , The default is 10 preservation 10 individual
stopasgroup=false # The default is false, When the process is killed , Send... To this process group stop The signal , Include subprocesses
killasgroup=false # The default is false, Send... To the process group kill The signal , Include subprocesses
startretries=3 # Number of auto retries that failed to start , The default is 3
start-up supervisor
/usr/bin/python2 /usr/bin/supervisord -c /etc/supervisord.conf( The path needs to be replaced with supervisord.conf Otherwise, an error will be reported )
边栏推荐
猜你喜欢
随机推荐
数论--负进制转换
CentOS install redis
Angr(二)——angr_ctf
Angr(七)——angr_ctf
常用类的小知识
SQL 题目整理
strut2 表单标签
测试计划、测试方案
IO流中的输入流
三、unittest测试用例五种运行方式
Swing component Icon
数论--约数研究
Basic concepts of testing
存储、计算、分布式存储篇(收集整理适合小白)
配置FTP虚拟用户及访问控制
Small knowledge of common classes
Angr (VII) -- angr_ ctf
Trojaning Attack on Neural Networks 论文阅读笔记
Swing组件
Detailed explanation of chrome developer tools








