Ext.: https://www.cnblogs.com/qmhuang/p/8196132.html
Configuring supervisor to implement Process daemon 1. Install Supervisor
2. Start the service
Supervisord-c/etc/supervisord.conf
Go to the CD/ETC directory to find the Supervisord.conf profile and Supervisord.d folder, use Vim to edit the supervisord.conf file, pull to the bottom we can see
files = Supervisord.d/*.ini This code indicates that it will load all the. ini profiles in the Supervisord.d folder3. Edit the configuration file then we create a Delploy.ini file in Supervosprd.d and edit the following
[Program:deploylinux] #DeployLinux the name of the program command=dotnet DeployLinux.dll #需要执行的命令directory =/home/publish #命令执行的目录environment = Aspnetcore__environment=production #环境变量user =root #用户stopsignal =int autostart=true #是否自启动autorestart =true # Whether to automatically restart startsecs=3 #自动重启时间间隔 (s) stderr_logfile=/var/log/ossoffical.err.log #错误日志文件stdout_logfile =/var/log/ Ossoffical.out.log #输出日志文件
4. Overloaded Configuration Files
Executing commands using the experience profile run the Supervisor service
Supervisorctl Reload //Reload configuration file
5. Visit the Web site in the case of dotnet Xxx.dll startup program without executing the external access to the site path successfully supervisor log as below, in the log we see during the boot process, the service loaded our configuration file Deploy.ini 6. Unexpected situation this problem should not be encountered, but because I do not know the circumstances of the operation, so because there is no start service and once burned, broken down to alert yourself that you did not start the service, executionsupervisord-c/etc/supervisord.conf Start
Accessing the graphical interface of Supervisor 1. Modify the configuration to change the configuration in supervisord.conf as follows 2. Overload the supervisor configuration and executeSupervisorctl Reload Reload configuration3. Open port before accessing its web management interface, you need to open the port you configured for him, here we assigned to him is 9001 port, below are some of the port management commands
Firewall-cmd--query-port=9001/tcp //monitoring port open Firewall-cmd--add-port=9001/tcp //Open 80 port Firewall-cmd-- REMOVE-PORT=9001/TCP //off 80-port sudo firewall-cmd--reload /Reload Configuration
4. Access graphical interface port open after successful access to Supervisor interface program for process management
Using the Supervisor daemon in Centos7