💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
**1.安装** `sudo yum install -y supervisor`   **2.开机启动** `sudo systemctl enable supervisord`   **3.启动** `sudo systemctl start supervisord`   **4.查看启动** `ps -ef | grep supervisor`   **5.创建项目** 配置文件默认 `vim /etc/supervisord.conf ` 在 **/etc/supervisord.d** 文件夹下面添加 **.ini** 后缀的文件,例如:**demo.ini** 内容如下 ``` [program:power] process_name=power user=root command=sleep 2 directory=/ autorestart=true stderr_logfile=/var/log/supervisor/power/power.err.log stdout_logfile=/var/log/supervisor/power/power.out.log environment=ASPNETCORE_ENVIRONMENT=Production stopsignal=INT autorestart=true startsecs=1 ``` 通过配置文件来启动 ~~~swift supervisord -c /etc/supervisord.conf ~~~ **6.web界面操作(建议用nginx做反代)** ``` [inet_http_server] port=*:8080 #外网用 * 或者指定ip+端口 139.198.160.116:8080 username=user password=123 ``` 配置常见问题: 1.安全组端口开放 2.防火墙(firewalld | iptables)[防火墙](https://www.kancloud.cn/linjinkun/mysql1/2351042) 3.lsof -i:8080 查看端口占用   **7.常见问题** ### unix:///var/run/supervisor.sock no such file 新建一个空的文件然后修改一下权限即可: ``` sudo touch /var/run/supervisor/supervisor.sock sudo chmod 777 /var/run/supervisor/supervisor.sock systemctl restart supervisord ``` **8.常用命令** ``` systemctl restart supervisord systemctl status supervisord.service supervisorctl stop all supervisorctl start all supervisorctl reload supervisorctl status supervisorctl 查看细项 ```