修改你的/etc/init.d/httpd腳本
在開(kāi)始處#!/bin/bash之后的行后
插入
# chkconfig: 345 61 61
# description:Apache httpd
#符號(hào)不能去掉
啟用方法一:運(yùn)行ntsysv 選中 httpd,就可以了
啟用方法二:
1、添加httpd服務(wù):
[root@localhost ~]# chkconfig –add httpd
2、查看httpd服務(wù):[root@localhost ~]# chkconfig –list|grep httpd
httpd 0:關(guān)閉 1:關(guān)閉 2:關(guān)閉 3:關(guān)閉 4:關(guān)閉 5:關(guān)閉 6:關(guān)閉
3、開(kāi)機(jī)時(shí)自動(dòng)運(yùn)行httpd服務(wù):
[root@localhost ~]# chkconfig –level 345 httpd on
4、查看httpd服務(wù)狀態(tài):
[root@localhost ~]# chkconfig –list|grep httpd
httpd 0:關(guān)閉 1:關(guān)閉 2:關(guān)閉 3:啟用 4:啟用 5:啟用 6:關(guān)閉
如對(duì)本文有疑問(wèn),請(qǐng)?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會(huì)為你解答!! 點(diǎn)擊進(jìn)入論壇