Centos7安装frp

IT
IT
IT
351
文章
1
评论
2020年12月28日00:15:26 评论 1,526 1595字阅读5分19秒

下载

官网下载地址 https://github.com/fatedier/frp

Centos7安装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扫一扫
  • weinxin
  • 我的头条
  • 头条扫一扫
  • weinxin
IT
  • 本文由 发表于 2020年12月28日00:15:26
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
阿里云盘 CentOS

阿里云盘

阿里云盘 阿里云算法、存储、安全、智能、网络等多领域的科学家与工程师联合打造,基于阿里云多年技术沉淀为用户提供更快、更安全、更流畅、更智能的个人云体验,目前已开放邀测报名。 简述 之前阿里云旗下的公司...
Eureka同步到nacos Nacos

Eureka同步到nacos

官方介绍文档地址 https://nacos.io/zh-cn/docs/nacos-sync.html 官方安装文档地址 https://nacos.io/zh-cn/docs/nacos-sync...