1、把启动程序的命令添加到/etc/rc.d/rc.local文件中,比如下面的是设置开机启动httpd。
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
touch /var/lock/subsys/local
后台启动1
nohup /home/fengxiao/my_prog/frp_client/client/frpc -c /home/fengxiao/my_prog/frp_client/client/frpc.ini &
后台启动2
nohup /home/fengxiao/my_prog/frp2_client/client/frpc -c /home/fengxiao/my_prog/frp2_client/client/frpc.ini &