centos一键搭建frp

安装命令

C
①wget --no-check-certificate https://raw.githubusercontent.com/clangcn/onekey-install-shell/master/frps/install-frps.sh -O ./install-frps.sh


②chmod 700 ./install-frps.sh


③./install-frps.sh install

 

 

接下填写自己frp配置

Please select frps download url:
[1].aliyun (default)
[2].github
Enter your choice (1, 2 or exit. default [aliyun]): 1                                     #选择阿里云,下载速度快传输稳定
---------------------------------------
Your select: 1
---------------------------------------
Loading network version for frps, please wait...
frps Latest release file frp_0.20.0_linux_amd64.tar.gz
Loading You Server IP, please wait...
You Server IP:47.97.212.84
Please input your server setting:

Please input frps bind_port [1-65535](Default Server Port: 5443):7000          #frp端口   
frps bind_port: 7000


Please input frps vhost_http_port [1-65535](Default vhost_http_port: 80):8888    #web_http端口
frps vhost_http_port: 8080


Please input frps vhost_https_port [1-65535](Default vhost_https_port: 443):443  #web_https端口
frps vhost_https_port: 443


Please input frps dashboard_port [1-65535](Default dashboard_port: 6443):7500    #面板登陆端口
frps dashboard_port: 7500

Please input dashboard_user (Default: admin):admin                                            #面板登录账号
frps dashboard_user: admin

Please input dashboard_pwd (Default: j4tl8c0r):admin                                          #面板登录密码
frps dashboard_pwd: xtXT1234

Please input token (Default: L3HSVDDTkD1dGPWt):xietao                                     #面板秘钥
frps token: xietao


Please input frps max_pool_count [1-200]                                                            #接下来全回车默认即可
(Default max_pool_count: 50):
frps max_pool_count: 50

##### Please select log_level #####
1: info (default)
2: warn
3: error
4: debug
#####################################################
Enter your choice (1, 2, 3, 4 or exit. default [1]): 
log_level: info


Please input frps log_max_days [1-30]
(Default log_max_days: 3 day):
frps log_max_days: 3

##### Please select log_file #####
1: enable (default)
2: disable
#####################################################
Enter your choice (1, 2 or exit. default [1]): 
log_file: enable

##### Please select tcp_mux #####
1: enable (default)
2: disable
#####################################################
Enter your choice (1, 2 or exit. default [1]): 
tcp_mux: true

##### Please select kcp support #####
1: enable (default)
2: disable
#####################################################
Enter your choice (1, 2 or exit. default [1]): 
kcp support: true

============== Check your input ==============
You Server IP      : 47.97.212.84
Bind port          : 7000
kcp support        : true
vhost http port    : 8888
vhost https port   : 443
Dashboard port     : 7500
Dashboard user     : admin
Dashboard password : admin
token              : xietao
tcp_mux            : true
Max Pool count     : 50
Log level          : info
Log max days       : 3
Log file           : enable
==============================================

Press any key to start...or Press Ctrl+c to cancel
frps install path:/usr/local/frps
config file for frps ... done
download frps ... done
download /etc/init.d/frps... done
setting frps boot... done

+--------------------------------------------------+
|        Manager for Frps, Written by Clang        |
+--------------------------------------------------+
| Intro: http://koolshare.cn/thread-65379-1-1.html |
+--------------------------------------------------+

Starting Frps(0.20.0)... done
Frps (pid 9327)is running.

+---------------------------------------------------------+
|        frps for Linux Server, Written by Clang          |
+---------------------------------------------------------+
|     A tool to auto-compile & install frps on Linux      |
+---------------------------------------------------------+
|    Intro: http://koolshare.cn/thread-65379-1-1.html     |
+---------------------------------------------------------+


Congratulations, frps install completed!
==============================================
You Server IP      : 47.97.212.84
Bind port          : 7000
KCP support        : true
vhost http port    : 8888
vhost https port   : 443
Dashboard port     : 7500
token              : xietao
tcp_mux            : true
Max Pool count     : 50
Log level          : info
Log max days       : 3
Log file           : enable
==============================================
frps Dashboard     : http://47.97.212.84:7500/
Dashboard user     : admin
Dashboard password : admin
==============================================

frps status manage : frps {start|stop|restart|status|config|version}
Example:
  start: frps start
   stop: frps stop
restart: frps restart
[root@iZf7d1mnq8flveZ ~]# frps start

+--------------------------------------------------+
|        Manager for Frps, Written by Clang        |
+--------------------------------------------------+
| Intro: http://koolshare.cn/thread-65379-1-1.html |
+--------------------------------------------------+

Frps (pid 9327) already running.

 

访问http://ip:7500/   能够访问就说明搭建成功。 打不开请开放安全组。自动开机重启,frps start开启 frps stop停止frps restart重启服务。以下是命令

服务器端管理命令

  1. /etc/init.d/frps start 开启
  2. /etc/init.d/frps stop 停止
  3. /etc/init.d/frps restart 重启
  4. /etc/init.d/frps status 状态
  5. /etc/init.d/frps config 配置文件
  6. /etc/init.d/frps version 版本

接下载配置客户端。使用我的工具进行图形界面配置。

下载地址https://www.lanzous.com/i6w973c

 

 

第一步点击一键配置,然后点击配置文件,复制frpc.ini代码

[common]
server_addr = 47.97.212.84                      #服务器公网ip
server_port = 7000                                   #frp端口,和上面的bind_port要一样
token = xietao                                          #面板秘钥

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22                                         #照着填
remote_port = 5000

[web]
type = http 
local_ip = 192.168.1.104                           #本地IIS搭建的网站的ip
local_port = 8888                                      #本地IIS搭建的网站的端口
custom_domains = 47.97.212.84                #服务器公网ip

 

第三步点击启动,右下方的启动成功即为配置成功。

最后访问http://服务器ip:8888  即可访问本地搭建的网站

 

来发评论吧~