wget https://archive.apache.org/dist/apr/apr-1.7.0.tar.gz wget https://archive.apache.org/dist/apr/apr-util-1.6.1.tar.gz tar -zxf apr-1.7.0.tar.gz cd apr-1.7.0 && ./configure --prefix=/usr/local/apr && make && make install cd .. tar -zxf apr-util-1.6.1.tar.gz cd apr-util-1.6.1 && ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr && make && make install
2.httpd-2.2.27编译安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
wget https://archive.apache.org/dist/httpd/httpd-2.2.27.tar.gz tar -zxf httpd-2.2.27.tar.gz cd httpd-2.2.27
echo"[2/5] 安装 apr 和 apr-util..." cd /usr/local/src wget -q https://archive.apache.org/dist/apr/apr-1.7.0.tar.gz wget -q https://archive.apache.org/dist/apr/apr-util-1.6.1.tar.gz tar -zxf apr-1.7.0.tar.gz && cd apr-1.7.0 ./configure --prefix=$APR && make -j$(nproc) && make install cd .. tar -zxf apr-util-1.6.1.tar.gz && cd apr-util-1.6.1 ./configure --prefix=$APR_UTIL --with-apr=$APR && make -j$(nproc) && make install cd ..
echo"[3/5] 下载并编译 httpd-$HTTPD_VER..." wget -q https://archive.apache.org/dist/httpd/httpd-$HTTPD_VER.tar.gz tar -zxf httpd-$HTTPD_VER.tar.gz && cd httpd-$HTTPD_VER ./configure \ --prefix=$PREFIX \ --with-apr=$APR \ --with-apr-util=$APR_UTIL \ --enable-so \ --enable-rewrite \ --enable-deflate \ --enable-expires \ --enable-headers \ --enable-mods-shared=all make -j$(nproc) && make install