sudo vim /lib/systemd/system/frpc.service
[Unit]
Description=frpc service
After=network.target network-online.target syslog.target
Wants=network.target network-online.target
[Service]
Type=simple
#启动服务的命令(此处写你的frps的实际安装目录)
ExecStart=/usr/local/frp/frpc -c /usr/local/frp/frpc.ini
[Install]
WantedBy=multi-user.target
#然后启动 frps
sudo systemctl start frpc
#再打开自启动
sudo systemctl enable frpc
#重启
sudo systemctl restart frpc
#停止
sudo systemctl stop frpc
#查看应用日志
sudo systemctl status frpc