CentOS7 安裝frp與開機啟動


1. 下載frp程序文件

https://github.com/fatedier/frp/releases

2. 解壓文件

下載后解壓到自己的目錄,我這里解壓到/usr/local/frp:

 

3. 添加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安裝目錄修改。

4. 設置開機啟動

systemctl daemon-reload
systemctl enable frp

5. 啟動 frp

systemctl start frp

6. 查看frp是否啟動

ps aux | grep frp

看到這里就說明啟動成功了。


免責聲明!

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



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