版本
FRP各平台客户端下载:https://github.com/fatedier/frp/releases
Linux客户端安装包
![](https://ywhao.bitworkshop.cn/wp-content/uploads/2022/05/RJ8_U4T_51AIZ4FX_UN.png)
Windows客户端安装包
![](https://ywhao.bitworkshop.cn/wp-content/uploads/2022/05/IPBOLPAK9SR3AM7M_XFI.png)
运行命令
Linux命令
./frpc -c frpc.ini
Windows命令
frpc.exe -c frpc.ini
后台脚本
Windows脚本.bat
这个前面讲过就不重复了。
Linux脚本
Linux 服务管理两种方式service和systemctl
systemd是Linux系统最新的初始化系统(init),作用是提高系统的启动速度,尽可能启动较少的进程,尽可能更多进程并发启动。systemd对应的进程管理命令是systemctl
使用systemctl来控制启动
这里是系统自带的systemd,里面有很多service,而frp下载包中也有个systemd,不要混淆了。
可以把frp/systemd/frpc.service直接挪到系统systemd下,只需修改frp路径即可。
或者新建一个,vim。
vim /etc/systemd/frpc.service
在frpc.service里写入以下内容
[Unit]
Description=frpc service
After=network.target syslog.target
Wants=network.target
[Service]
Type=simple
#启动服务的命令(此处写你的frpc的实际安装目录)
ExecStart=/project/frp/frpc -c /project/frp/frpc.ini
[Install]
WantedBy=multi-user.target
shift+:+wq!保存并强制退出。
刷新服务
systemctl daemon-reload
启动frpc
systemctl start frpc
打开自启动
systemctl enable frpc
关闭开机自启动
systemctl disable frpc
重启应用
systemctl restart frpc
停止应用
systemctl stop frpc
查看应用的日志
systemctl status frpc
Comments NOTHING