76 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 安装服务
## 云服务器
### 下载
命令行 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
```
serverAddr = "60.205.246.14"
serverPort = 7000
auth.token = "abcd1234"
[[proxies]]
name = "gitea"
type = "tcp"
localIP = "192.168.1.8"
localPort = 3001
remotePort = 3389
```