1.安裝supervisor:
sudo apt install supervisor -y
2.創建配置文件:
vim /etc/supervisor/conf.d/frpc.conf
3.frpc.conf:
[program:frpc]
command = /root/frpc/frpc -c /root/frpc/frpc.ini
autostart = true
stdout_logfile_maxbytes = 1024MB
stdout_logfile_backups = 3
4.重新加載一下supervisor:
# 重啟supervisor sudo systemctl restart supervisor # 查看supervisor運行狀態 sudo supervisorctl status