一、安装Apache2.2.22
1、到官网下载 http://httpd.apache.org/download.cgi ,选择相应的版本
这里,我选择的是最新的版本
可以先下载到windows系统中,上传到linux,
也可以直接下载到linux : wget http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.20.tar.gz
2、解压 tar -zxvf httpd-2.4.20.tar.gz
3、创建 Ahache 的安装目录
mkdir /usr/local/Apache2
4、回到httpd-2.4.20目录下配置, ./configure --prefix=/usr/local/Apache2 --enable-module=shared
出现错误:
configure: error: APR not found. Please read the documentation.
解决办法:
先安装 yum install gcc
1.下载所需软件包:
1.wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
2.wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
3.wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
2.编译安装:
yum remove apr-util-devel apr apr-util-mysql apr-docs apr-devel apr-util apr-util-docs
3.具体步骤如下:
a:解决apr not found问题>>>>>>
1.[root@xt test]# tar -zxf apr-