码迷,mamicode.com
首页 > Web开发 > 详细

Ubuntu 下配置apache和APR

时间:2015-03-10 22:49:15      阅读:243      评论:0      收藏:0      [点我收藏+]

标签:

软件环境:ubuntu14.04  虚拟机Vmware  软件:http://httpd.apache.org/  httpd-2.2.29.tar.gz  不需要单独下载APR。

1.解压apache源码
# tar xvzf httpd-2.2.29.gz
# cd httpd-2.2.29
2.安装apr
# cd srclib/apr
# ./configure --prefix=/usr/local/apr //配置到指定目录
# make
# make install //需要再root模式下运行 前面加sudo
3.安装apr-util
# cd ../apr-util/
# ./configure --prefix=/usr/local/apr-util 
    --with-apr=/usr/local/apr
# make
# make install //需要root权限 前面加sudo
# cd ../../
4.安装apache

#./configure --prefix=/usr/local/apache2 --enable-modules=so --enable-mods-shared=all --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-proxy-ajp --enable-proxy-balancer --enable-rewrite--enable-status --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ 
//如果有错误
mod_deflate has been requested but can not be built due to prerequisite failures(ubuntu centent) 那是没有安装zlib包。centos下可以采用yum install zlib-devel, ubuntu下可以采用apt-get install zlib1g-dev.

# make
# make install 同上

5. 安装tomcat-native.tar.gz  //暂时没配
# cd /opt/tomcat/bin
# tar zxvf tomcat-native.tar.gz
# cd tomcat-native-src/jni/native
# ./configure --with-apr=/usr/local/apr

 6. 添加环境变量

# vim /etc/profile
添加:export LD_LIBRARY_PATH=/usr/local/apr/lib

 

Ubuntu 下配置apache和APR

标签:

原文地址:http://www.cnblogs.com/zCoderJoy/p/4328453.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!