赞
踩
https://github.com/fatedier/frp/releases/
tar -xzvf frp_0.46.0_linux_amd64.tar.gz -C /etc/frps
vim /etc/frps/frps.ini
- [common]# 用于客户端和服务端连接的端口
- bind_port =7000# 用于客户端和服务端连接的口令
- token = e8fxAAGBIS7KbhT0Z6iaeTEjTq6kxasb
- # 服务端仪表板的端口
- dashboard_port =7500# 打开仪表板页面登录的用户名和密码
- dashboard_user = root
- dashboard_pwd = admin
vim /etc/systemd/system/frps.service
- [Service]
- Type=simple
- ExecStart=/etc/frps/frps -c /etc/frps/frps.ini
- KillSignal=SIGQUIT
- TimeoutStopSec=5
- KillMode=process
- PrivateTmp=true
- StandardOutput=syslog
- StandardError=inherit
-
- [Install]
- WantedBy=multi-user.target
- # 启动frps
- systemctl start frps
- # 开机自动启动frps
- systemctl enable frps
- # 重启frps
- systemctl restart frps
- # 停止frps
- systemctl stop frps
- # 查看frps状态
- systemctl status frps
https://github.com/fatedier/frp/releases/
根据客户端设备的情况选择相应的frp程序进行下载,Windows下下载和解压等步骤不再描述。
假定你下载了“frp_0.46.0_windows_amd64.zip”,将其解压在了C盘根目录下,并且将文件夹重命名为“frp”,可以删除其中的frps和frps.ini、frps_full.ini文件。
tar -xzvf frp_0.44.0_linux_amd64.tar.gz -C /usr/local/frpc
vim /usr/local/frpc/frpc.ini
[common] server_addr = 服务器公网ip地址 server_port =7000 token = e8fxAAGBIS7KbhT0Z6iaeTEjTq6kxasb [web] type = http local_port =8080 custom_domains = 域名 [rdp]# 远程桌面 type = tcp local_ip =127.0.0.1 local_port =3389 remote_port =7001[smb]# 远程文件访问 type = tcp local_ip =127.0.0.1 local_port =445 remote_port =7002
vim /etc/systemd/system/frpc.service
- [Unit]# 服务名称,可自定义
- Description = frpc service
- After = network.target syslog.target
- Wants = network.target
-
- [Service]
- Type = simple
- # 启动frps的命令,需修改为您的frps的安装路径
- ExecStart =/usr/local/frpc/frpc -c /usr/local/frpc/frpc.ini
-
- [Install]
- WantedBy = multi-user.target
- # 启动frps
- systemctl start frpc
- # 开机自动启动frps
- systemctl enable frpc
- # 重启frps
- systemctl restart frpc
- # 停止frps
- systemctl stop frpc
- # 查看frps状态
- systemctl status frpc
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。