linux boot from the start setting service program

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/liangzhao_jay/article/details/89095511

Path script is: /opt/test.sh

Service Name: test

The first step: the need to create a soft link in the /etc/init.d directory ln -s /opt/test.sh test

Step two: add services chkconfig --add test

              After executing this statement can be seen in the catalog /etc/rc.d/rc3.d/ S digital test files, S for start, here is the digital service script #chkconig: 2345 85 80

              2345 is among the seven modes of operation Linux system. Sequence behind the first number representative of the start, the smaller the number, the first promoter; the latter sequence numbers are closed and services, empathy.

              This service can be seen at the beginning of the K /etc/rc.d/rc0.d. K represents the exit kill

              In fact, the implementation of service test start, equivalent to the implementation /etc/init.d/test start

The third step: reboot the system to see if realized boot from the start

Guess you like

Origin blog.csdn.net/liangzhao_jay/article/details/89095511
Recommended