1cd /home 2wget https://github.com/fatedier/frp/releases/download/v0.32.1/frp_0.32.1_linux_amd64.tar.gz 3# 解压 4tar -xzf frp_0.32.1_linux_amd64.tar.gz 5# 配置 6cd frp_0.32.1_linux_amd64
1[common] 2bind_port = 7000 3kcp_bind_port = 7000 4tls_enable = true 5token = e12adc3959ba59babe76e057f40f883b 6# 面板配置 7dashboard_port = 7500 8dashboard_user = admin 9dashboard_pwd = password 10# 日志文件 11log_file = ./frps.log 12# 记录的日志级别 13log_level = info 14# 日志留存3天 15log_max_days = 3 16# 超时时间 17authentication_timeout = 0 18# 最大链接池,每个代理预先与后端服务器建立起指定数量的最大链接数 19max_pool_count = 50
1# yum 2yum install systemd 3# apt 4apt install systemd
vi /etc/systemd/system/frps.service
1[Unit] 2# 服务名称,可自定义 3Description = frp server 4After = network.target syslog.target 5Wants = network.target 6 7[Service] 8Type = simple 9# 启动frps的命令,需修改为您的frps的安装路径 10ExecStart = /home/frp_0.32.1_linux_amd64/frps -c /home/frp_0.32.1_linux_amd64/frps.ini 11 12[Install] 13WantedBy = multi-user.target
1# 启动frp 2systemctl start frps 3# 停止frp 4systemctl stop frps 5# 重启frp 6systemctl restart frps 7# 查看frp状态 8systemctl status frps
systemctl enable frps
安装步骤同frps
1[common] 2server_addr = xx.xx.xx.xx 3server_port = 7000 4tls_enable = true 5tcp_mux = false 6token = e12adc3959ba59babe76e057f40f883b 7 8[ssh] 9type = tcp 10local_ip = 127.0.0.1 11local_port = 22 12remote_port = 6000 13 14[tomcat] 15type = http 16local_ip = 127.0.0.1 17local_port = 8080 18remote_port = 8080