1
mkdir -p /opt/frp && cd /opt/frp
wget https://github.com/fatedier/frp/releases/download/v0.67.0/frp_0.67.0_linux_amd64.tar.gz
12
# 扁平化解压到当前文件夹tar -zxvf frp_0.67.0_linux_amd64.tar.gz --strip-components=1
vim /etc/systemd/system/frps.service
12345678910111213
[Unit]Description=frp serverAfter=network.target syslog.targetWants=network.target[Service]Type=simpleExecStart=/opt/frp/frps -c /opt/frp/frps.tomlRestart=on-failureRestartSec=5s[Install]WantedBy=multi-user.target
123456789
# frps.tomlbindPort = 7000auth.method = "token"auth.token = "your-token-here"# Web界面配置webServer.port = 7500webServer.user = "wcguo"webServer.password = "password"
1234567891011
# 重载 systemd 配置systemctl daemon-reload# 启动 frpssystemctl start frps# 设置开机自启systemctl enable frps# 查看状态(检查是否运行正常)systemctl status frps