httpd-2.2.23安装

安装Apache的步骤

# 下载httpd-2.2.23.tar.gz安装包

# tar zxvfhttpd-2.2.23.tar.gz

# cd httpd-2.2.23

# ./configure--prefix=/usr/local/apache2

# make && makeinstall

在安装过程中,执行./configure --prefix=/usr/local/apache2后出现报错信息如下:

“configure: error: APR not found . Please readthe documentation”

解决办法:

1、首先需要下载三个软件包

     wgethttp://archive.apache.org/dist/apr/apr-1.4.5.tar.gz  

     wgethttp://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz  

     wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip

1)、第一步解决“apr not found”

   #tar zxvf apr-1.4.5.tar.gz

    #./configure –prefix=/use/local/apr

    #make&&makeinstall

2)、第二步解决“apr-utilnot found”

    # tar -zxfapr-util-1.3.12.tar.gz  

# cd apr-util-1.3.12  

#./configure--prefix=/usr/local/apr-util--with-apr=/usr/local/apr/bin/apr-1-config  

# make && make install

     3)、第三步解决pcre问题

          #unzip -opcre-8.10.zip  

#cd pcre-8.10  

#./configure --prefix=/usr/local/pcre  

#make && make install

如果出现报错信息,以上解决步骤缺一不可

<1>、在安装pcre的时候可能遇到的问题:“libtool: line 990: g++: command not found”

解决办法:安装gcc-c++   

     #yum install gcc-c++

在安装gcc-g++后我们继续make。g++问题解决了但是出现以下错误

         ibtool: link: Fatalconfigurationerror.

         make[1]: *** [libpcrecpp.la] 错误 1

         make[1]: Leaving directory `/usr/app/pcre-8.00'

         make: *** [all] 错误 2

现在我们需要操作的就是重新./configure并且make,如果问题依然没有得到解决并报错

/usr/bin/ld: .libs/pcrecpp.o: relocationR_X86_64_32S against `.bss'can not be used when making a shared object;recompile with -fPIC

.libs/pcrecpp.o:couldnot read symbols: Bad value

collect2: ld returned 1exit status

make[1]: ***[libpcrecpp.la] 错误 1

make[1]: Leaving directory`/usr/app/pcre-8.00'

make: *** [all] 错误 2

这次解决的办法是在配置的时候添加“--disable-shared --with-pic”

# ./configure --prefix=/usr/local/pcre --disable-shared    --with-pic

以上问题都解决后我们可以继续安装apache了,在编译的时候我们需要加上“--with-apr=/usr/local/apr  --with-apr-util=/usr/local/apr-util  --with-pcre=/usr/local/pcre”

如#./configure–prefix=/use/local/apache2 --with-apr=/usr/local/apr  --with-apr-util=/usr/local/apr-util  --with-pcre=/usr/local/pcre


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值