內網穿透神器FRP一鍵部署腳本centos7


前言

本文將詳解在CentOS 7 上安裝配置frp服務器端的教程.

服務端frps安裝

1  一鍵安裝卸載腳本
2 安裝腳本
3 
4 wget https://raw.githubusercontent.com/stilleshan/frps/master/frps_linux_install.sh && chmod +x frps_linux_install.sh && ./frps_linux_install.sh
5 卸載腳本
6 
7 wget https://raw.githubusercontent.com/stilleshan/frps/master/frps_linux_uninstall.sh && chmod +x frps_linux_uninstall.sh && ./frps_linux_uninstall.sh

如現有服務器上已存在 frps 服務,請先運行卸載腳本,在運行安裝腳本.

安裝完成后配置frps.ini並重啟服務.

1 vi /usr/local/frp/frps.ini
2 # 修改 frps.ini 配置
3 sudo systemctl restart frps
4 # 重啟 frps 服務即可生效

 

配置參考

 1 [common]
 2 bind_addr = 0.0.0.0
 3 bind_port = 7000
 4 bind_udp_port = 7001
 5 kcp_bind_port = 7000
 6 vhost_http_port = 80
 7 vhost_https_port = 443
 8 dashboard_addr = 0.0.0.0
 9 dashboard_port = 7500
10 dashboard_user = admin
11 dashboard_pwd = admin         # 這里設置為管理面板配置的密碼
12 log_file = ./frps.log
13 log_level = info
14 log_max_days = 3
15 disable_log_color = false
16 token = 12345678              # 這里設置為客戶端配置的token
17 allow_ports = 2000-3000,3001,3003,4000-50000
18 max_pool_count = 5
19 max_ports_per_client = 0
20 subdomain_host = frps.com
21 tcp_mux = true

使用systemctl命令來控制frps

 1 sudo systemctl start frps
 2 # 啟動frps
 3 sudo systemctl enable frps
 4 # 服務器開機自動啟動frps
 5 sudo systemctl status frps
 6 # 查看狀態
 7 sudo systemctl restart frps
 8 # 重啟frps
 9 sudo systemctl stop frps
10 # 停止frps

 

 

檢查服務器端安裝情況

輸入http://服務器IP:7500來查看 frps 服務狀態

本文來源於互聯網,經過作者驗證后發布,收藏作為后期查閱使用。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM