frps服务
[root@cqds-db-mysql01 ~]# cat frps.service
[Unit]
Description=Frp Server Service
After=network.target syslog.target
Wants=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5s
ExecStart=/usr/local/frp/frps -c /usr/local/frp/frps.ini
[Install]
WantedBy=multi-user.target
frpc服务
[root@cqds-db-mysql01 ~]# cat frpc.service
[Unit]
Description=Frpc Server Service
After=network.target syslog.target
Wants=network.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5s
ExecStart=/opt/frp/frpc -c /opt/frp/frpc.ini
[Install]
WantedBy=multi-user.target
重载服务
[root@cqds-db-mysql01 ~]# systemctl daemon-reload
[root@cqds-db-mysql01 ~]# systemctl start frpc
[root@cqds-db-mysql01 ~]# ps -fe|grep frp
root 14922 1 0 22:59 ? 00:00:00 /opt/frp/frpc -c /opt/frp/frpc.ini
root 14957 9150 0 22:59 pts/0 00:00:00 grep --color=auto frp
[root@cqds-db-mysql01 ~]# systemctl enable frpc
Created symlink from /etc/systemd/system/multi-user.target.wants/frpc.service to /usr/lib/systemd/system/frpc.service.
Comments | NOTHING