用源码安装的apache替代原来的apache

来源:互联网 发布:淘宝评价中心 编辑:程序博客网 时间:2024/04/28 10:03

源码安装目录为/usr/local/httpd2.4

将源码目录/bin/apachectl命名为httpd并复制到/etc/init.d/中

cp /usr/local/httpd2.4/bin/apachectl /etc/init.d/httpd

编辑复制过去的httpd文件,添加如下内容,若不加httpd则不支持chkconfig命令

# chkconfig: - 85 15# description: The Apache HTTP Server is an efficient and extensible  \#              server implementing the current HTTP standards.

启动项中添加httpd,并设置运行级别

chkconfig –add httpd
chkconfig –level 2345 httpd on

原创粉丝点击