客户端服务端下载地址:
https://github.com/fatedier/frp/releases/download/v0.69.1/frp_0.69.1_linux_amd64.tar.gz

先安装systemd服务:
apt install systemd
然后创建frps.service (nano /etc/systemd/system/frps.service)文件,输入以下配置

[Unit]
# 服务名称,可自定义
Description = frp server
After = network.target syslog.target
Wants = network.target

[Service]
Type = simple
# 启动frps的命令,需修改为您的frps的安装路径
ExecStart = /root/frp_0.69.1_linux_amd64/frps -c /root/frp_0.69.1_linux_amd64/frps.toml

[Install]
WantedBy = multi-user.target

设置开机启动

systemctl enable frps

启动frp

sudo systemctl start frps

停止frp

sudo systemctl stop frps

重启frp

sudo systemctl restart frps

查看frp状态

sudo systemctl status frps

最后修改:2026 年 06 月 23 日
如果觉得我的文章对你有用,请随意赞赏