毕业设计的辛酸路——Ubuntu10.04+apache安装

   接近四个小时的时间终于征服了Apache,前一段时间晕晕忽忽的安装上了,但是不小心系统出问题了,今天浪费了很多时间,留个标记!以后备用。
 

直接安装httpd, 如果没有错误提示直接可以略过一下的步骤,但是我在配置的过程中出现了很多错误,现在总结如下:

[root@kong test]# tar -zxf httpd-2.4.1.tar.gz

[root@kong httpd-2.4.1]# ./configure --prefix=/usr/local/apache2

1.出现的错误提示:apr not found

解决apr not found问题

APRAPR-UTIL的下载地址:http://apr.apache.org/download.cgi

   [root@kong test]# tar -zxf apr-1.4.6.tar.gz

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

   [root@kong apr-1.4.6]# make

   [root@kong apr-1.4.6]# make install

 2.解决APR-util not found问题

   [root@kong test]# tar -zxf apr-util-1.4.1.tar.gz

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

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

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

3  ../configure仍提示APR-util not found

增加--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util后出现

configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

#./configure –help | grep pcre

--with-pcre=PATH        Use external PCRE library

#tar –zxvf  pcre-8.10.tar.gz

#cd pcre-8.10

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

#make

4.出现:libtool: line 990: g++: command not found错误

执行:apt-get install g++

再次执行make出现:

5.出现:

make[1]: *** [libpcrecpp.la] 错误 1
make[1]: Leaving directory `/usr/local/pcre-8.10'
make: *** [all]
错误 2

执行:apt-get install buold-essential

6.执行./configure --disable-shared --with-pic       

再执行:

#make

#make install

7.编译Apache

  [root@kong httpd-2.4.1]# ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util/ -with-pcre=/usr/local/pcre

 [root@kong httpd-2.4.1]# make

 [root@kong httpd-2.4.1]# make install

[root@kong httpd-2.4.1]# /usr/local/apache2/bin/apachectl start

IE中输入地址,显示:

It works!

Apache安装完成。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值