使用systemd配置開機自啓,適用於 centos7 Ubuntu 16 或 debian 8。centos
vi /etc/systemd/system/frps.service 新建此文件,並寫入如下內容
:
[Unit]
Description=frps daemonide
[Service]
Type=simple
ExecStart=/usr/bin/frps -c /etc/frps/frps.inicentos7
[Install]
WantedBy=multi-user.targetcode
啓動並設爲開機自啓。
$ systemctl start frps
$ systemctl enable frpsip
------------centos6.5及如下---------------------
vi /etc/rc.local
在最下面加一行/usr/sbin/frp/frps -c /usr/sbin/frp/frps.ini
其中 /usr/sbin/frp是程序放置的目錄,重啓okget