Linux

CentOS 7 配置 frp 服务后台自启动

CentOS 7 配置 frp 服务后台自启动

解决方法

使用 systemctl 来控制启动,在 frps.service 里写入以下内容:

vi /lib/systemd/system/frps.service

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

[Service]
Type=simple
#启动服务的命令(此处写你的frps的实际安装目录)
ExecStart=/test/frp_0.20.0/frps -c /test/frp_0.20.0/frps.ini

[Install]
WantedBy=multi-user.target

相关命令

systemctl start frps   //启动frps
systemctl stop frps   //停止应用
systemctl restart frps   //重启frps
systemctl enable frps   //打开自启动
systemctl disable frps   //关闭开机自启动
systemctl status frps   //查看应用的日志

本文为原创文章,著作权归作者所有:来自「KOBIN 技术随笔」作者的原创作品,转载请标明出处。
CentOS 7 配置 frp 服务后台自启动
https://blog.kobin.cn/blog/system/s2/301.html
(0)

评论功能升级维护公告

为响应国家网络信息安全合规要求,并进行全面的安全策略升级,本站自即日起暂时关闭博客的评论功能。

在此期间,您将无法发表新的评论,但仍可正常浏览所有历史文章及现有评论。如果您遇到问题需要协助,可以选择在线留言,或者发送邮件到 chen@kobin.cn 。

对于给您带来的不便,深表歉意。感谢您的理解与支持!

KOBIN 技术随笔
2025 年 8 月 26 日