linux平台下apache的源码安装和将apache服务配置成系统服务
安装apache服务
下载apache源码包
# tar -zxvf http-2.2.29.tar.gz
# cd http-2.2.29
# ./configure --prefix=/usr/local/apache --enable-so --enable-cgi
# make
# make install
配置成系统服务:
# cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
# cp /usr/local/apache/bin/apachectl /usr/local/bin/httpd
创建符号链接
# ln -s /etc/init.d/httpd /etc/rc.d/rc5.d/S61httpd
# ln -s /etc/init.d/httpd /etc/rc.d/rc4.d/S61httpd
# ln -s /etc/init.d/httpd /etc/rc.d/rc3.d/S61httpd
打开/etc/init.d/httpd文件在#!/bin/bash下面加入
#chkconfig:345 61 61
#description:Apache
执行chkconfig --list |grep httpd就会出现httpd服务开机运行在345级别
注册服务 chkconfig --add httpd
设置启动级别 chkconfig --levels 345 httpd on
本文出自 “欧阳俊” 博客,请务必保留此出处http://ouyangjun.blog.51cto.com/10284323/1701802
linux平台下apache的源码安装和将apache服务配置成系统服务
原文地址:http://ouyangjun.blog.51cto.com/10284323/1701802