CentOS5/6的啓動流程centos
啓動流程畫了張圖,看着更清晰些: (centos7的啓動流程變化挺大的,這部分待補充)bash
補充(/etc/rc.d/rc.local 不屬於任何服務,爲特殊文件,可將不能定義爲服務又想開機運行的命令定義在此文件中)ide
添加自定義服務:centos7
[root@el5 init.d]# vi /etc/init.d/testsrv spa #!/bin/bashblog #chkconfig: 223 92 60ip #description: programs at periodic scheduled times. vixie cron adds a \it # number of features to the basic UNIX cron, including better \io # security and more powerful configuration options.#table echo "hello"
[root@el5 init.d]# chkconfig --add testsrv
[root@el5 init.d]# service testsrv hello |