소개
Linux 시스템에서는 systemd
frp 서버 frps
의 있습니다.
systemd
를 제어하는 데 사용하려면 먼저 설치 한 후 해당 디렉터리에 파일을 만들어야 frps
합니다 .systemd
/etc/systemd/system
frps.service
설치하다systemd
Linux 서버에 설치되어 있지 않은 경우 또는 다른 명령을 사용하여 설치할 systemd
수 있습니다 .yum
apt
systemd
# yum
yum install systemd
# apt
apt install systemd
frps.service
파일 편집
$ vim /etc/systemd/system/frps.service
콘텐츠 작성
[Unit]
# 服务名称,可自定义
Description = frp server
After = network.target syslog.target
Wants = network.target
[Service]
Type = simple
# 启动frps的命令,需修改为您的frps的安装路径
ExecStart = /path/to/frps -c /path/to/frps.ini
[Install]
WantedBy = multi-user.target
명령을 사용하여 systemd
FRP 관리
# 启动frps
systemctl start frps
# 停止frps
systemctl stop frps
# 重启frps
systemctl restart frps
# 查看frps状态
systemctl status frps
frps
전원을 켤 때 자동 시작 구성
systemctl enable frps
다른
systemd
제어 및 구성을 사용하여 frpc
부팅하는 과정은 위와 동일합니다.