chkconfig httpd添加方法推薦
本篇報(bào)道向大家介紹了chkconfig httpd添加方法,希望對(duì)大家學(xué)習(xí)chkconfig httpd方面有所幫助,以下是此方法的具體實(shí)現(xiàn) 。
修改你的/etc/init.d/httpd腳本 在開(kāi)始處#!/bin/bash之后的行后
插入
# chkconfig: 345 61 61
# description:Apache httpd
#符號(hào)不能去掉
啟用方法一:運(yùn)行ntsysv 選中 httpd,就可以了
啟用方法二:
1、添加chkconfig httpd服務(wù):
[root@localhost ~]# chkconfig –add httpd
2、查看chkconfig 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、查看chkconfig 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)閉
【編輯推薦】
- 輕松掌握Linux chgrp與chown命令
- Linux Cat命令深度用法實(shí)例說(shuō)明
- Linux Cat命令實(shí)際應(yīng)用詳解
- Linux Cat命令三大主要功能詳解
- 詳解Linux chgrp和chown命令的用法