记录一下Linux设置Frp开机启动的方法

  • 在/etc/systemd/system下添加frps.service或frpc.service
[Unit]
Description=frpc daemon
After=syslog.target  network.target
Wants=network.target

[Service]
Type=simple
ExecStart=/root/frpc/frpc -c /root/frpc/frpc.ini #启动命令根据自己情况填写目录
Restart= always
RestartSec=1min
ExecStop=/usr/bin/killall frpc


[Install]
WantedBy=multi-user.target
  • 相关命令
systemctl enable frpc(frps) #设置开机启动
systemctl start frpc(frps) #启动
systemctl stop frpc(frps) #停止
systemctl status frpc(frps) #状态

相关文章:

  • 2022-12-23
  • 2022-02-20
  • 2021-04-17
  • 2022-12-23
  • 2021-10-23
猜你喜欢
  • 2021-12-03
  • 2022-12-23
  • 2022-01-08
  • 2021-11-22
  • 2021-07-16
  • 2021-12-09
相关资源
相似解决方案