1. Add the command to start in /etc/rc.local
Refer to the startup method of tomcat zookeeper kafka, etc.
2, chkconfig add service
Explain the contents of the service file under the /etc/rc.d/init.d directory
# chkconfig: 2345 20 80
It means that the random script is started at run level 2, 3, 4, and 5, the priority of start is 20, the priority of stop is 80, and the priority of start and stop is the smaller the number, the higher the priority.
3,
4,
5,