frp開機啟動


暫時只介紹linux版本的做法,作為備忘。

 

添加systemd配置文件:

vim /usr/lib/systemd/system/frp.service

文件內容如下:

[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安裝目錄修改。

設置開機啟動

systemctl daemon-reload
systemctl enable frp 

啟動 frp

systemctl start frp

查看frp是否啟動

ps aux | grep frps

centos7 查看啟動服務項

使用 systemctl list-unit-files 可以查看啟動項 

左邊是服務名稱,右邊是狀態,enabled是開機啟動,disabled是開機不啟動

可以使用 systemctl status xxx.service查看服務狀態

轉鏈接:https://www.jianshu.com/p/f5527d73bca3


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM