tech-blog/content/posts/linux添加frps为系统启动.md

45 lines
491 B
Markdown
Executable File

+++
date = '2025-12-21T17:02:45+08:00'
draft = false
title = 'linux添加frps为系统启动'
+++
## 增加一个服务(frps), 使用systemctl控制
cat > /etc/systemd/system/frps.service <<EOF
[Unit]
Description=Frp Server Service
After=network.target
[Service]
Type=simple
ExecStart=/root/frp_0.63.0_linux_amd64/frps -c /root/frp_0.63.0_linux_amd64/frps.toml
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl enable frps
systemctl start frps