下载
官网下载地址 https://github.com/fatedier/frp
解压
[root@iZ2zef7avvm4qvuh1f2bhxZ ~]# tar -xvf frp_0.34.3_linux_arm64.tar
移动至 /usr/local
[root@iZ2zef7avvm4qvuh1f2bhxZ ~]# mkdir /usr/local/frp [root@iZ2zef7avvm4qvuh1f2bhxZ ~]# mv frp_0.34.3_linux_arm64/* /usr/local/frp/
配置systemctl来控制,服务端运行
- 服务端
[root@iZ2zef7avvm4qvuh1f2bhxZ ~]# 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
- 重新加载
[root@iZ2zef7avvm4qvuh1f2bhxZ ~]# systemctl daemon-reload
- 启动/停止/重启,查看状态,设置开机自启/关闭开机自启
[root@iZ2zef7avvm4qvuh1f2bhxZ ~]# systemctl start frp [root@iZ2zef7avvm4qvuh1f2bhxZ ~]# systemctl stop frp [root@iZ2zef7avvm4qvuh1f2bhxZ ~]# systemctl restart frp [root@iZ2zef7avvm4qvuh1f2bhxZ ~]# systemctl status frp ● frp.service - The nginx HTTP and reverse proxy server Loaded: loaded (/usr/lib/systemd/system/frp.service; disabled; vendor preset: disabled) Active: active (running) since Mon 2020-12-28 00:14:54 CST; 6ms ago Main PID: 1704 ((frps)) CGroup: /system.slice/frp.service Dec 28 00:14:54 iZ2zef7avvm4qvuh1f2bhxZ systemd[1]: Started The nginx HTTP and reverse proxy server. Dec 28 00:14:54 iZ2zef7avvm4qvuh1f2bhxZ systemd[1704]: Failed at step EXEC spawning /usr/local/...or Hint: Some lines were ellipsized, use -l to show in full. [root@iZ2zef7avvm4qvuh1f2bhxZ ~]# systemctl enable frp Created symlink from /etc/systemd/system/multi-user.target.wants/frp.service to /usr/lib/systemd/system/frp.service. [root@iZ2zef7avvm4qvuh1f2bhxZ ~]#
继续阅读
- 我的QQ
- QQ扫一扫
-
- 我的头条
- 头条扫一扫
-
评论