更新了frpc开机自启
This commit is contained in:
parent
1052efd92f
commit
9e8a93209d
38
frp配置.md
38
frp配置.md
@ -53,3 +53,41 @@ local_port = 3389
|
||||
remote_port = 6001
|
||||
```
|
||||
|
||||
### frp客户端开机自启
|
||||
|
||||
创建服务文件
|
||||
|
||||
```sh
|
||||
sudo vi /etc/systemd/system/frpc.serivce
|
||||
```
|
||||
|
||||
文件内容如下
|
||||
|
||||
```sh
|
||||
[Unit]
|
||||
Description=Frp Client
|
||||
After=network.target
|
||||
Wants=network.target
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
ExecStart=/home/yewuya/frp/frpc -c /home/yewuya/frp/frpc.ini # 为fpc和frpc.ini的文件路径
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
```
|
||||
|
||||
开启开机自启服务相关命令
|
||||
|
||||
```sh
|
||||
systemctl daemon-reload # 刷新服务列表
|
||||
systemctl enable frpc # 设置frpc开机自启
|
||||
systemctl disable frpc # 关闭frpc开机自启
|
||||
systemctl start frpc # 启动frpc服务
|
||||
systemctl stop frpc # 关闭frpc服务
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user