- A+
所属分类:linux技术
服务端
$ sudo vi /lib/systemd/system/frps.service -------------------------------- $ cat frps.service [Unit] Description=frps server service After=network.target [Service] Type=simple User=root Restart=on-failure RestartSec=5s ExecStart=/frp/frps -c /frp/frps.ini [Install] WantedBy=multi-user.target -------------------------------- $ sudo systemctl daemon-reload $ sudo systemctl enable frps
客户端
$ sudo vi /lib/systemd/system/frpc.service -------------------------------- $ cat frpc.service [Unit] Description=frp client service After=network.target [Service] Type=simple User=root Restart=on-failure RestartSec=5s ExecStart=/frp/frpc -c /frp/frpc.ini ExecReload=/frp/frpc reload -c /frp/frpc.ini [Install] WantedBy=multi-user.target -------------------------------- $ sudo systemctl daemon-reload $ sudo systemctl enable frpc