CentOS7.9实现frp内网穿透

一、下载frp0.34.3软件

# 下载frp软件
[root@localhost frp_0.34.3]# wget https://github.com/fatedier/frp/releases/download/v0.34.3/frp_0.34.3_linux_amd64.tar.gz


# 解压frp软件
[root@localhost frp_0.34.3]# tar -zxvf frp_0.34.3_linux_amd64.tar.gz 

# 将软件移至opt目录
[root@localhost frp_0.34.3]# mv frp_0.34.3_linux_amd64 /opt/frp_0.34.3


# 修改服务端frps.ini文件,token为客户端连接密码
[root@localhost frp_0.34.3]# vi /opt/frp_0.34.3/frps.ini 

[common]
bind_port = 7000
vhost_http_port = 80
token = Abc123

# 启动frp服务端
[root@localhost frp_0.34.3]# nohup /opt/frp_0.34.3/frps -c /opt/frp_0.34.3/frps.ini 

# 配置服务端管理
[root@localhost frp_0.34.3]# vi /etc/systemd/system/frps.service

[Unit]
Description=frps service
After=network.target

[Service]
Type=simple
ExecStart=/opt/frp_0.34.3/frps -c /opt/frp_0.34.3/frps.ini
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

# 刷新服务配置文件
[root@localhost frp_0.34.3]# sudo systemctl daemon-reload

# 启动frps服务端
[root@localhost frp_0.34.3]# sudo systemctl start frps

# 查询frps启动状态
[root@localhost frp_0.34.3]# sudo systemctl status frps

# 设置frps开机启动
[root@localhost frp_0.34.3]# sudo systemctl enable frps



  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值