cd /home/q/ sudo wget http://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.28.tar.gz sudo tar -xf httpd-2.4.28.tar.gz cd httpd-2.4.28 sudo ./configure --enable-so
如果提示:configure: error: APR not found. Please read the documentation. 则按以下步骤安装
cd ~
// 安装 apr sudo wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz sudo tar -zxf apr-1.4.5.tar.gz cd apr-1.4.5 sudo ./configure --prefix=/usr/local/apr sudo make sudo make install
// 安装 apr-util sudo wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz sudo tar -zxf apr-util-1.3.12.tar.gz cd apr-util-1.3.12 sudo ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr sudo make sudo make install
// 安装 pcre sudo wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip sudo unzip -o pcre-8.10.zip cd pcre-8.10 sudo ./configure --prefix=/usr/local/pcre sudo make sudo make install
再次安装 Apache
sudo ./configure --enable-so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre sudo make sudo make install