Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1653371
  • 博文数量: 135
  • 博客积分: 2820
  • 博客等级: 少校
  • 技术积分: 2544
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-16 13:33
文章分类

全部博文(135)

文章存档

2015年(1)

2014年(8)

2013年(16)

2012年(43)

2011年(56)

2010年(11)

分类: LINUX

2011-07-29 16:51:56

在 Redhat 上面使用源码的方式安裝 Apache 后,将 bin/apachectl 复制到 /etc/rc.d/init.d/ 目录,
并想用 chkconfig 将 Apache 设定成自动启动,但出现了 "service httpd does not support chkconfig"

[root@oracle9i mysql]# chkconfig --add httpd
service httpd does not support chkconfig

解决方法是打开/etc/rc.d/init.d/httpd (或 /etc/init.d/httpd),并再下面加入:

# chkconfig: - 85 15      //#不能省略,注意空格
# description: Apache is a World Wide Web server.  It is used to serve \   //description:后可任意字符串

例子:
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Startup script for the Apache Web Server
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server.  It is used to serve \


阅读(4486) | 评论(0) | 转发(0) |
0

上一篇:oracle 9i netca dbca 报错

下一篇:Linux lvm分区

给主人留下些什么吧!~~