vim /usr/lib/systemd/system/frp.service
文件內容以下:linux
[Unit]
Description=The nginx HTTP and reverse proxy server After=network.target remote-fs.target nss-lookup.target [Service] Type=simple ExecStart=/usr/local/frp/frps -c /usr/local/frp/frps.ini KillSignal=SIGQUIT TimeoutStopSec=5 KillMode=process PrivateTmp=true StandardOutput=syslog StandardError=inherit [Install] WantedBy=multi-user.target
ExecStart的內容請根據本身frp安裝目錄修改。nginx
systemctl daemon-reload
systemctl enable frp
systemctl start frp
ps aux | grep frps
centos7 查看啓動服務項vim
使用 systemctl list-unit-files 能夠查看啓動項 centos
左邊是服務名稱,右邊是狀態,enabled是開機啓動,disabled是開機不啓動ruby
可使用 systemctl status xxx.service查看服務狀態
轉連接:https://www.jianshu.com/p/f5527d73bca3
bash