使用systemctl来控制启动

vim /lib/systemd/system/frps.service

在frps.service里写入以下内容

[Unit]
Description=frps service
After=network.target syslog.target
Wants=network.target

[Service]
Type=simple
ExecStart=/root/frp037/frps -c /root/frp037/frps.ini

[Install]
WantedBy=multi-user.target

然后就启动frps

systemctl start frps 

再打开自启动

systemctl enable frps

关闭开机自启动

systemctl  disable frps

如果要重启应用,可以这样,systemctl restart frps
如果要停止应用,可以输入,systemctl stop frps
如果要查看应用的日志,可以输入,systemctl status frps

查看服务运行情况

ps auxw

发表评论