在编译安装httpd后,将其放到/etc/init.d/目录下,使其可以随开机自动启动,命令如下 chkconfig –add httpd,执行此命令后报错,提示“service apache does not support chkconfig“,这是因为在httpd中没有相关的chkconfig信息,导致chkconfig不能识别,所以要在httpd中添chkconfig的描述信息。 方法如下 编辑httpd文件。加入chkconfig描述信息: # description:http apache service # chkconfig: 2345 98 98 以上信息均为注释信息,前面一定要有# 这时,再次执行chkconfig –add httpd,httpd被成功加入服务,可以随机自动启动了。
RSS Feed
Twitter
June 15th, 2010
moonfox
Posted in
Tags: