Newbie, record it yourself 1. Install supervisor. Supervisor is developed based on Python. When you install Supervisor, Python dependencies are automatically installed, so no additional installation is required. # yun install supervisor 2. After successful installation, check the relevant files and directories generated under /etc supervisord.conf is the default configuration file supervisord.d is the directory where separate configuration files for other programs are stored 3. Configure supervisord.conf For all parameters, please refer to the official documentation. There are too many configuration items for us to understand. We only need to modify one place and keep the others unchanged. # vim /etc/supervisord.conf Locate the last [include] item in the document and change files = supervisord.d/*.ini to files = supervisord.d/*.conf to load the configuration of other applications. 4. Add a separate configuration file for the application (dotnet core) Create a new configuration file in the supervisord.d directory # touch /etc/supervisord.d/FirstApi.conf Open the file and add the following content [program:FirstApi] #Command to execute command=dotnet FirstApi.dll #Command execution directory directory=/home/www/first #Environment variable environment=ASPNETCORE__ENVIRONMENT=Production #Process execution user identity<br> user=root<br> stopsignal=INT #Whether to start automatically autostart=true #Whether to automatically restart autorestart=true #Automatic restart interval seconds startsecs=1 #Standard error log stderr_logfile=/var/log/FirstApi.err.log #Standard output log stdout_logfile=/var/log/FirstApi.out.log 5. Restart the supervisor service # supervisord -c /etc/supervisord.conf If the prompt "Another program is already listening on a port that one of our HTTP servers" appears, it means that the service is already running. You can restart the service by following the steps below. #Enter the console# supervisorctl #Reread the configuration #Update configuration update #Start all configurations start all #Check the status after success At this time, visit the program address again and find that the project has run successfully! This is the end of this article about how to install and configure the supervisor daemon under centos7. For more information about installing supervisor under centos7, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Vue uses element-ui to implement menu navigation
>>: Basic usage of find_in_set function in mysql
Main library binlog: # at 2420 #170809 17:16:20 s...
Arrange by functionNN : Indicates which earlier ve...
Detailed explanation of creating MySql scheduled ...
Table of contents 1. Event delegation Event Bubbl...
Table of contents 1. Download JDK (take jdk1.8.0 ...
The effect to be achieved: When the mouse is plac...
Operating system win10 MySQL is the 64-bit zip de...
The reason is that all files are encoded in utf8. ...
Preface The basic principle of MySQL master-slave...
1. Go to the official website: D:\mysql-5.7.21-wi...
Table of contents 1. Slow query configuration 1-1...
With the emergence of docker, many services have ...
Table of contents What is the Observer Pattern? S...
Preparation 1. Check whether the GPU supports CUD...
Today I received a disk alarm exception. The 50G ...