目录
1、软件名称
supervisor
关于这款软件的使用介绍,可以参见如下网址:
https://blog.csdn.net/yfanjy/article/details/105975723
2、yum 源-下载supervisor-
(1)Linux7
[root@mysql Web]# vi /etc/yum.repos.d/epel.repo [epel] name=Extra Packages for Enterprise Linux 7 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch failovermethod=priority enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo] name=Extra Packages for Enterprise Linux 7 - $basearch - Debug #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck=1 [epel-source] name=Extra Packages for Enterprise Linux 7 - $basearch - Source #baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck=1
(2)Linux8
[epel] name=Extra Packages for Enterprise Linux 8 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/8/$basearch metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch failovermethod=priority enabled=1 gpgcheck=0 #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 [epel-debuginfo] name=Extra Packages for Enterprise Linux 8 - $basearch - Debug #baseurl=http://download.fedoraproject.org/pub/epel/8/$basearch/debug metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-8&arch=$basearch failovermethod=priority enabled=0 #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 #gpgcheck=1 [epel-source] name=Extra Packages for Enterprise Linux 8 - $basearch - Source #baseurl=http://download.fedoraproject.org/pub/epel/8/SRPMS metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-8&arch=$basearch failovermethod=priority enabled=0 #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 #gpgcheck=1
3、安装supervisor
[root@mysql yum.repos.d]# yum install -y supervisor
4、配置supervisor
(1)配置路径
[root@mysql supervisord.d]# cd /etc/supervisord.d
(2)配置文件内容-以web5000.ini为例
[root@mysql supervisord.d]# vi web5000.ini [program:web5000] command=dotnet NetModular.Demo.WebHost.dll --urls http://*:5000 & directory=/data/Web/publish_5000/ autostart=true autorestart=true stderr_logfile=/var/log/web5000.err.log stdout_logfile=/var/log/web5000.out.log user=root startsecs=1 stopsignal=INT
(3)应用程序路径
[root@mysql Web]# ll /data/Web/
5、启动supervisor服务程序
systemctl enable supervisord systemctl start supervisord
6、查看supervisor状态及重载
supervisorctl status supervisorctl reload
7、启动web服务
supervisorctl start web5000 supervisorctl start web5001 supervisorctl start web5004 supervisorctl start web5005 supervisorctl start web5006