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

来源:互联网 发布:bilibili mac客户端 编辑:程序博客网 时间:2024/05/29 18:41
   接近四个小时的时间终于征服了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 fromhttp://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安装完成。

原创粉丝点击