
frpc开机自启配置
配置systemctl进行开机启动,首先创建frpc.service服务(用finalshell按这个理解/lib/systemd/system/创建frpc.service也可以)
nano /lib/systemd/system/frpc.service如果命令无效,使用 apt 安装 systemd(Debian/Ubuntu)
apt install systemd[Unit]
#服务描述
Description=frpc service
After=network.target syslog.target
Wants=network.target
[Service]
Type=simple
#执行命令,修改为你的frpc的路径
ExecStart=/root/frp/frpc -c /root/frp/frpc.toml
[Install]
WantedBy=multi-user.target保存ctrl+o,退出ctrl+x,回车
关于frpc的命令
以下命令都是基于玩客云armbian系统,也就是Debian系统的命令,centOs系统用不了,注意你的系统类型。
重载服务
systemctl daemon-reload使用systemctl命令来控制frpc
启动
sudo systemctl start frpc关闭
sudo systemctl stop frpc重启
sudo systemctl restart frpc查看状态
sudo systemctl status frpc设置开机自动启动
sudo systemctl enable frpc禁用开机自动启动
sudo systemctl disable frpc查看服务是否开机启动
sudo systemctl is-enabled frpc查看frp进程
ps -aux|grep frp| grep -v grep结束frp进程(找到进程号pid,即第一个数值)
kill -9 pid查看所有服务进程
ps aux
评论 (0)