1.解压linux压缩包
tar xf frp_0.59.0_linux_arm.tar.gz
2.修改frpc.toml
serverAddr = "你的服务地址"
serverPort = 7000
webServer.addr = "0.0.0.0"
webServer.port = 7001
webServer.user = "admin"
webServer.password = "admin"
[[proxies]]
name = "test-tcp"
type = "tcp"
localIP = "0.0.0.0"
localPort = 631
remotePort = 10000
- 配置systemctl 启动,在/etc/systemd/system/目录创建一个frpc.service 文件,内容如下。
[Unit]
# 服务名称,可自定义
[Unit]
# 服务名称,可自定义
Description = frp server
After = network.target syslog.target
Wants = network.target
[Service]
Type = simple
# 启动frps的命令,需修改为您的frps的安装路径
ExecStart = /root/frp_0.59.0_linux_arm/frpc -c /root/frp_0.59.0_linux_arm/frpc.toml
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
[Install]
WantedBy = multi-user.target
- 启动服务
systemctl enable frpc
systemctl start frpc