1. 安装Apache

1.1 软件下载

wget https://mirror.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.2.31.tar.gz

1.2 安装编译所需软件

yum install gcc gcc-c++ zlib zlib-devel -y

1.3 解压软件

tar xf httpd-2.2.31.tar.gz

1.4 进入目录并编译安装

cd httpd-2.2.31
./configure --prefix=/app/apache2.2.31 --enable-deflate --enable-expires --enable-headers --enable-modules=most --enable-so --with-mpm=worker --enable-rewrite
make && make install
cd ../

1.5 创建软连接

ln -s /app/apache2.2.31 /app/apache