You will need to ensure that you have either libtool 1.5.6 or 2.2.6b, or later. Expat 2.0.1 and PCRE 8.02 are also recommended to be installed. If building PCRE from source, you'll also need g++.
没有libtool和PCRE时,需要先安装libtool和PCRE
下载解压apache2.4.38
1 2 3
$ cd /usr/local $ wget http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.38.tar.gz $ tar zxvf httpd-2.4.38.tar.gz
进入httpd-2.4.38目录,执行命令安装apache2
1
$ ./configure --prefix=/usr/local/apache2
报错: configure: error: APR not found. Please read the documentation.
通过INSTALL文件了解到需要安装APR and APR-Util
安装APR and APR-Util到srclib目录下
进入httpd-2.4.38下的srclib目录,执行命令下载并解压APR and APR-Util
1 2 3 4
$ wget http://mirrors.hust.edu.cn/apache//apr/apr-1.6.5.tar.gz $ wget http://mirror.bit.edu.cn/apache//apr/apr-util-1.6.1.tar.gz $ tar zxvf apr-1.6.5.tar.gz $ tar zxvf apr-util-1.6.1.tar.gz