/ 中存储网

Linux系统如何编译安装Apache2.4.3服务器

2014-02-19 10:44:01 来源:ITJS.CN
Linux下解压缩

tar zxvf httpd-2.4.3.tar.gz

编译安装

cd httpd-2.4.3

./configure

提示如下错误信息

configure: error: APR not found.  Please read the documentation.

解压缩,安装APR1.4.5

tar zxvf apr-1.4.5.tar.gz

cd apr-1.4.5

./configure

make

make install

再次编译

cd ..

cd httpd-2.4.3

./configure

提示如下错误信息

configure: error: APR-util not found.  Please read the documentation.

解压缩,安装APR-util

tar zxvf apr-util-1.4.1.tar.gz

cd apr-util-1.4.1

./configure

提示需要指定--with-apr参数

configure: error: APR could not be located. Please use the --with-apr option.

指定参数编译

./configure --with-apr=/usr/local/apr

make

make install

再次编译apache,成功

cd ..

cd httpd-2.4.3

./configure

make

make install

以下是配置虚拟主机部分的报错信息

错误信息:AH00548: NameVirtualHost has no effect and will be removed in the next release

意思很明显  NameVirtualHost 已经无效,所以配置虚拟主机时不需要设置NameVirtualHost