Ubuntu12.04上安装apache2.4过程(源代码编译安装方式)

Ubuntu12.04下安装apache2.4过程(源代码编译安装方式)


首先需要下载apache源代码及相关软件,下载地址分别是:

apache:http://httpd.apache.org/download.cgi

apr/apr-util:http://apr.apache.org/download.cgi

pcre:http://ftp.exim.llorien.org/pcre/

apache不用说了,apr/apr-util/pcre都是安装apache所必须的软件。

首先编译安装apache

[root@localhost apache]# tar jxvf httpd-2.4.1.tar.bz2      //解压apache的压缩包

[root@localhost apache]# cd httpd-2.4.1     //定位到httpd-2.4.1 文件夹下

[root@localhost httpd-2.4.1]# ls       //查看显示httpd-2.4.1 文件夹下内容

[root@localhost httpd-2.4.1]#./configure –help | more      //查看安装apache配置参数

[root@localhost httpd-2.4.1]#./configure  –prefix=/usr/local/apache  –enable-so    //  配置apache路径 ,后面跟 –enable-so 参数表示让apache核心装载DSO

[root@localhost httpd-2.4.1]# make //编译apache

到了这里会报错

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

此时,安装下载的apr

[root@localhost apache]# tar -zxf apr-1.4.6.tar.gz

[root@localhost apache]# cd apr-1.4.6

[root@localhost apr-1.4.6]# ./configure –prefix=/usr/local/apr

[root@localhost apr-1.4.6]# make

[root@localhost apr-1.4.6]# make install

重新编译apache,又报错

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

要安装下载的apr-util

[root@localhost apache]# tar -zxf  apr-util-1.4.1.tar.gz

[root@localhost apache]#  cd  apr-util-1.4.1

[root@localhost apr-util-1.4.1]# ./configure –prefix=/usr/local/apr-util –with-apr=/usr/local/apr/bin/apr-1-config

[root@localhost apr-util-1.4.1]# make

[root@localhost apr-util-1.4.1]# make install

免责声明: 本文仅代表作者个人观点,与无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。

相关资料

Ubuntu12.04上安装apache2.4过程(源代码编译安装方式)

相关文章:

你感兴趣的文章:

标签云: