category
Technology
Tags
CentOS
Frp
Collection
CreateTime
Nov 5, 2021 08:00 AM
UpdateTime
Dec 11, 2023 12:14 PM
Published
Published
资源
frps
stilleshan • Updated Dec 5, 2024
frp
fatedier • Updated Dec 7, 2024
安装
wget https://raw.githubusercontent.com/stilleshan/frps/master/frps_linux_install.sh && chmod +x frps_linux_install.sh && ./frps_linux_install.sh # 国内 gitee 镜像 wget https://gitee.com/stilleshan/frps/raw/master/frps_linux_install.sh && chmod +x frps_linux_install.sh && ./frps_linux_install.sh
配置
vim /usr/local/frp/frps.ini
[common] bind_addr = 0.0.0.0 bind_port = 7000 bind_udp_port = 7001 kcp_bind_port = 7000 vhost_http_port = 80 vhost_https_port = 443 dashboard_addr = 0.0.0.0 dashboard_port = 7500 dashboard_user = busyhe dashboard_pwd = Yuan0613.. log_file = ./frps.log log_level = info log_max_days = 3 disable_log_color = false token = busyhe allow_ports = 2000-3000,3001,3003,4000-50000 max_pool_count = 5 max_ports_per_client = 0 tcp_mux = true
启动服务&其他命令
# 启动服务 sudo systemctl start frps # 开机自启 sudo systemctl enable frps # 状态查询 sudo systemctl status frps # 重启服务 sudo systemctl restart frps # 停止服务 sudo systemctl stop frps
卸载
wget https://raw.githubusercontent.com/stilleshan/frps/master/frps_linux_uninstall.sh && chmod +x frps_linux_uninstall.sh && ./frps_linux_uninstall.sh # 国内 gitee 镜像 wget https://gitee.com/stilleshan/frps/raw/master/frps_linux_uninstall.sh && chmod +x frps_linux_uninstall.sh && ./frps_linux_uninstall.sh
Problem
启动服务报错
● frps.service - Frp Server Service Loaded: loaded (/usr/lib/systemd/system/frps.service; enabled; vendor preset: disabled) Active: activating (auto-restart) (Result: exit-code) since 五 2021-11-05 15:06:40 CST; 10ms ago Process: 2122 ExecStart=/usr/local/frp/frps -c /usr/local/frp/frps.ini (code=exited, status=1/FAILURE) Main PID: 2122 (code=exited, status=1/FAILURE) 11月 05 15:06:40 iZ2ze268h8zj94u0naz9tgZ systemd[1]: frps.service: main process exited, code=exited, status=1/FAILURE 11月 05 15:06:40 iZ2ze268h8zj94u0naz9tgZ systemd[1]: Unit frps.service entered failed state. 11月 05 15:06:40 iZ2ze268h8zj94u0naz9tgZ systemd[1]: frps.service failed.
解决方法:重启服务器,关闭nginx。
访问不了7500页面
解决方法:服务器配置安全规则,关闭防火墙