Lamp搭建---apache的安装

1.下载apache httpd-2.4.tar.gz文件  apache

2.解压 tar -zxvf httpd-2.4.tar.gz浏览器

3. ./configure --enable-module=allide

//如出现错误  Checking for APR :noui

解决以下  :下载apr http:httpd.apache.org   apr.1.5.1.tar.gzspa

解压  :tar -zxvf apr.1.5.1.tar.gzorm

cd apr-1.5.1rem

./configure prefix=usr/local/aprit

make编译

make installform



//如出现Checking apr-util:no

解决以下: 下载apr-util

解压 tar -zxvf apr-util.1.3.8

cd apr-util.1.3.8

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

make

make install


//从新编译apache  

./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

#make

make install


//若是遇到提示cofigure error:pcre-config for libpcre not found.PCRE is required and availble form http://pcre.org/

//解决 下载pcre  地址:http://ftp.exim.llorien.org/pcre/

tar -zxvf pcre-8.36.tar.gz

cd pcre-8.36

./configure prefix=/usr/local/pcre

make

make install


4.make

5make install


默认状况下,会安装到/usr/local/apace2目录下

启动apache  /usr/local/apache2/bin/apachectl start

//若是在浏览器里没有正常的显示 It works 的话,而是看到一个 test page页面,处理以下,输入以下的命令

yum remove httpd

而后重启apache,再次输入http://localhost就能够看到正常的It works 页面了

相关文章
相关标签/搜索