1. 新建的根目录 /wenzd
2. 浏览到根目录并下载:
wget https://github.com/fatedier/frp/releases/download/v0.52.3/frp_0.52.3_linux_amd64.tar.gz
3. 解压到当前目录:
tar -zxvf frp_0.52.3_linux_amd64.tar.gz
4. 更改目录权限(我并不确定这个是否必须):
chmod -R 700 frp
chmod -R 700 frp
chown -R root:root frp
5. 添加到 systemd 当中:
cd /etc/systemd/system/
vi frps.service
其内容为:
[Unit] Description=Frp Server Service After=network.target [Service] Type=simple User=root Restart=on-failure RestartSec=5s ExecStart=/root/frp/frps -c /root/frp/frps.ini ExecReload=/root/frp/frps -c /root/frp/frps.ini LimitNOFILE=1048576 [Install] WantedBy=multi-user.target
6. 在那之前,需要将frps运行程序从wenzd剪切到 /root/ 目录当中:
mv frp_0.52.3_linux_amd64/ /root/frp
7.保存后设置开机自启动:
systemctl daemon-reload
systemctl start frps.service
systemctl enable frps.service