网硕互联技术交流社区

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 839|回复: 0

CentOS7 安装frp与开机启动

[复制链接]

主题

帖子

0

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
0
发表于 2022-7-28 17:41:17 | 显示全部楼层 |阅读模式
1. 下载frp程序文件
  1. https://github.com/fatedier/frp/releases
复制代码

2. 解压文件

下载后解压到自己的目录,我这里解压到/usr/local/frp:

3. 添加systemd配置文件:
  1. vim /usr/lib/systemd/system/frp.service
复制代码

文件内容如下:
  1. [Unit]
  2. Description=The nginx HTTP and reverse proxy server
  3. After=network.target remote-fs.target nss-lookup.target

  4. [Service]
  5. Type=simple
  6. ExecStart=/usr/local/frp/frps -c /usr/local/frp/frps.ini
  7. KillSignal=SIGQUIT
  8. TimeoutStopSec=5
  9. KillMode=process
  10. PrivateTmp=true
  11. StandardOutput=syslog
  12. StandardError=inherit

  13. [Install]
  14. WantedBy=multi-user.target
复制代码

ExecStart的内容请根据自己frp安装目录修改。

4. 设置开机启动
  1. systemctl daemon-reloadsystemctl enable frp
复制代码

5. 启动 frp

  1. systemctl start frp
复制代码

6. 查看frp是否启动

  1. ps aux | grep frp
复制代码

看到这里就说明启动成功了。


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|网硕互联技术交流社区

GMT+8, 2024-5-4 18:48 , Processed in 0.207132 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表