1
This commit is contained in:
parent
8ff528427b
commit
82780a575e
61
InterestingStuffs/frp设置.md
Normal file
61
InterestingStuffs/frp设置.md
Normal file
@ -0,0 +1,61 @@
|
||||
# 安装服务
|
||||
## 云服务器
|
||||
### 下载
|
||||
命令行 wget + xxx tar.gz链接
|
||||
|
||||
### 解压
|
||||
tar -zxvf + xxx tar.gz
|
||||
|
||||
### 删除frpc文件
|
||||
|
||||
### 编写frps.toml 文件
|
||||
|
||||
bindPort = 7000
|
||||
auth.token = "abcd1234"
|
||||
|
||||
### 服务器开放端口
|
||||
|
||||
### 服务自动运行
|
||||
|
||||
|
||||
```
|
||||
vim /etc/systemd/system/frps.service
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
[Unit]
|
||||
# 服务名称,可自定义
|
||||
Description = frp server
|
||||
After = network.target syslog.target
|
||||
Wants = network.target
|
||||
|
||||
[Service]
|
||||
Type = simple
|
||||
# 启动frps的命令,需修改为您的frps的安装路径
|
||||
ExecStart = /root/frp_0.62.1_linux_amd64/frps -c /root/frp_0.62.1_linux_amd64/frps.toml
|
||||
|
||||
[Install]
|
||||
WantedBy = multi-user.target
|
||||
```
|
||||
|
||||
1. **使用 systemd 命令管理 frps 服务**
|
||||
|
||||
`# 启动frp sudo systemctl start frps # 停止frp sudo systemctl stop frps # 重启frp sudo systemctl restart frps # 查看frp状态 sudo systemctl status frps`
|
||||
### 设置 frps 开机自启动
|
||||
|
||||
```
|
||||
systemctl enable frps
|
||||
```
|
||||
|
||||
### 查看进程
|
||||
|
||||
```
|
||||
ps auxw
|
||||
```
|
||||
|
||||
|
||||
## 客户端
|
||||
cd /Volumes/AceN50002T/frp
|
||||
(base) guoyize@guoyizedeMac-mini frp % cd frp_0.61.2_darwin_arm64
|
||||
(base) guoyize@guoyizedeMac-mini frp_0.61.2_darwin_arm64 % ./frpc -c frpc.toml
|
Loading…
x
Reference in New Issue
Block a user