chkconfig httpd添加方法推薦
本篇報道向大家介紹了chkconfig httpd添加方法,希望對大家學習chkconfig httpd方面有所幫助,以下是此方法的具體實現(xiàn) 。
修改你的/etc/init.d/httpd腳本 在開始處#!/bin/bash之后的行后
插入
# chkconfig: 345 61 61
# description:Apache httpd
#符號不能去掉
啟用方法一:運行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、開機時自動運行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命令深度用法實例說明
- Linux Cat命令實際應用詳解
- Linux Cat命令三大主要功能詳解
- 詳解Linux chgrp和chown命令的用法