Heim  >  Artikel  >  Backend-Entwicklung  >  chkconfig 添加httpd的方法

chkconfig 添加httpd的方法

WBOY
WBOYOriginal
2016-05-19 14:05:161511Durchsuche

修改你的/etc/init.d/httpd脚本
在开始处#!/bin/bash之后的行后
插入
# chkconfig: 345 61 61
# description:Apache httpd
#符号不能去掉

启用方法一:运行ntsysv 选中 httpd,就可以了
启用方法二:
1、添加httpd服务:
[root@localhost ~]# chkconfig –add httpd

2、查看httpd服务:[root@localhost ~]# chkconfig –list|grep httpd
httpd      0:关闭 1:关闭  2:关闭 3:关闭  4:关闭  5:关闭  6:关闭

3、开机时自动运行httpd服务:
[root@localhost ~]# chkconfig –level 345 httpd on

4、查看httpd服务状态:
[root@localhost ~]# chkconfig –list|grep httpd
httpd      0:关闭  1:关闭 2:关闭 3:启用 4:启用 5:启用  6:关闭


http://www.086php.com/index.php/rcd-2/566

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn