1. [root@localhost ~]# cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd
2. [root@localhost ~]# vi /etc/init.d/httpd
3. 在第二行加入(必須,否則無法加入)
# chkconfig: 2345 85 15
# description: httpd is web server(此處為描述)。
說明:2345表示在2345這四種啟動(dòng)級別里面加載這個(gè)服務(wù),85表示啟動(dòng)(開機(jī)時(shí))順序號,15表示關(guān)閉(關(guān)機(jī)時(shí))順序號。
4. [root@localhost ~]# chkconfig -add httpd
5. [root@localhost ~]# chkconfig --level 35 httpd on
新聞熱點(diǎn)
疑難解答
圖片精選