[root@localhost ~]# ll /etc/rc.local
Irwxrwxrwx. 1 root root 13 4月10 21:46 /etc/rc.local -> rc.d/rc.local
#有一個鏈接文件,兩個文件修改哪一個都可以
[root@localhost ~]#vi /etc/rc.d/rc.local
#!/bin/sh
#
#This script will be executed *after* all the other init scripts.
#You can put your own initialization stuff in here if you don't
#want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
#默認會touch這個文件,每次系統啟動時都會touch這個文件,這個文件的修改時間就是系統的啟動時間
/etc/rc.d/init.d/httpd start
#如果寫入RPM包安裝的apache服務的啟動命令,apache服務就會在開機時自動啟動

新聞熱點
疑難解答