记一次ubutnu14.10下安装编译Apache

来源:互联网 发布:淘宝怎么清仓 编辑:程序博客网 时间:2024/06/06 02:49

1、先从apache官网下载源码包,链接:点击打开链接。我这里选择的是2.4.18的版本。

2、借助根据官网的提示,进行编译安装:

即,先将下载的源码包解压:tar -zxvf http-NN.tar.gz(NN是对应的版本号);

  接着,进入源码包:cd http-NN;然后使用./configure --prerfix=apache所要安装的路径;

这一步,如果提示这些错误:

checking for APR... noconfigure: error: APR not found.  Please read the documentation. checking for pcre-config... falseconfigure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
根据官网提示:

一般只要去下载:apr、apr-until(http://apr.apache.org/download.cgi)以及pcre (ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/);

接着将这三个包解压完后,

1、先编译安装apr:

./configure

 make  && make install  ;

注意:在执行configure可能会出现 rm: cannot remove `libtoolT': No such file or directory错误信息。 

                打开configure这个文件,将 $RM “$cfgfile” 那行注释掉 ,然后重新编译即可。

2、然后编译安装apr-until:

./configure -with-apr=/usr/local/apr 

make && make install

3、最后编译安装pcre:

 ./configure  

make  && make install

注意:如果提示g++: command not found错误,则说明没有安装gcc+,装上gcc+就可以编译过去

接着进行apahce的编译安装,

./configure  

如果提示pcre-config没有找到,则使用

sudo apt-get updata

apt-get install libpcre3 libpcre3-dev

 然后就可以正常编译了!

接着输入make && make install 即可安装apache了!


0 0
原创粉丝点击