centos6.9编译安装httpd2.4(2)

来源:互联网 发布:淘宝二级页面全屏 编辑:程序博客网 时间:2024/06/11 20:44

一、区别

在安装httpd时可以指定apr和apr-util的安装路径,可以一次性把这三个软件包都装好    httpd但是:    apr解压后文件和apr-util要放在httpd源码解压后的srclib目录下的    并且改名为apr 和apr-util

二、安装

1.卸载旧版本

yum remove httpd*yum remove apr*

2.解压软件包

tar xf  apr-1.6.2.tar.gz  tar xf  apr-util-1.6.0.tar.gz tar xf  httpd-2.4.27.tar.bz2 

3.安装需要的包或组

yum -y groupinstall Development\ tools yum -y install expat-devel yum -y install  pcre-develyum -y install  openssl-devel   

4.转移apr和apr-util源码位置

mv apr-1.6.2  httpd-2.4.27/srclib/aprmv apr-util-1.6.0  httpd-2.4.27/srclib/apr-util

5.编译

cd httpd-2.4.27/ ./configure --prefix=/app/httpd24 --sysconfdir=/etc/httpd24 --enable-so --enable-ssl --enable-rewrite --with-zlib --with-pcre --with-included-apr --enable-modules=most --enable-mpms-shared=all --with-mpm=prefork

6.安装

cd   apr-1.6.2make && make install

三、可能出现的错误

libtool: error: error: cannot install ‘libaprutil-1.la’ to a directory not ending in /usr/local/httpd-2.4/lib

原创粉丝点击