CentOS5/6的启动流程
启动流程画了张图,看着更清晰些: (centos7的启动流程变化挺大的,这部分待补充)
补充(/etc/rc.d/rc.local 不属于任何服务,为特殊文件,可将不能定义为服务又想开机运行的命令定义在此文件中)
添加自定义服务:
[root@el5 init.d]# vi /etc/init.d/testsrv #!/bin/bash #chkconfig: 223 92 60 #description: programs at periodic scheduled times. vixie cron adds a \ # number of features to the basic UNIX cron, including better \ # security and more powerful configuration options.# echo "hello"
[root@el5 init.d]# chkconfig --add testsrv
[root@el5 init.d]# service testsrv hello |
转载于:https://blog.51cto.com/jying/2103413