配置服务端 frps.service
cat /etc/systemd/system/frps.service <<'EOF'
[Unit]
Description=frps.service
After=network.target

[Service]
Type=simple
User=root
Restart=on-failure
RestartSec=5s
ExecStart=/usr/local/frp/frps -c /usr/local/frp/frps.ini

[Install]
WantedBy=multi-user.target

EOF

启动frps
systemctl start frps.service
开机自动启动frps
systemctl enable frps.service
重启frps
systemctl restart frps.service
停止frps
systemctl stop frps.service
查看frps状态
systemctl status frps.service

配置客户端 frpc.service
cat /etc/systemd/system/frpc.service <<'EOF'
[Unit]
Description=frpc.service
After=network.target

[Service]
Type=simple
User=root
Restart=on-failure
RestartSec=5s
ExecStart=/usr/local/frp/frpc -c /usr/local/frp/frpc.ini

[Install]
WantedBy=multi-user.target

EOF

启动frpc
systemctl start frpc.service
开机自动启动frpc
systemctl enable frpc.service
重启frpc
systemctl restart frpc.service
停止frpc
systemctl stop frpc.service
查看frpc状态
systemctl status frpc.service

标签: none

添加新评论