ubuntu 下安装apache
1.http://httpd.apache.org/download.cgi下载httpd-2.4.6解压后放在/usr/local/src
2.cd /usr/local/src/httpd-2.4.6
./configure --prefix=/usr/local/httpd --enable-so --enable-rewrite --enable-expires
--enable-expires --enable-cache --enable-mem-cache
运行后报错:apr not found
3.http://httpd.apache.org/download.cgi
在此网址下载apr包解压后放在/usr/local/src
./configure
make
make install
4.重复步骤2,并在--enable-mem-cache 后加上--with-apr=/usr/local/apr
运行后报错:not found apr-util
5.http://httpd.apache.org/download.cgi
在此网址下载apr-util包解压后放在/usr/local/src
./configure
make
make install
6.重复步骤2
./configure 后加上--with-apr-util=/usr/local/apr-util
运行后报错:没用pcre 包
7.http://pcre.org/
在此网址下载pcre包
./configure
make
make install
在此配置的时可能会出错是关于:C C++ compiler
需要安装gcc :apt-get install build-essential
可能需要安装yum:apt-get install yum
8.最后在./configure 后加上--with-pcre=/usr/local/pcre 运行(总共在./configure家了三条配置项)
make
make install
成功
9.启动apache服务
/usr/local/httpd/bin/apachectl -k start
报错:是关于libpcre的错误
本人试了一些方法没用
重启电脑后就好了,路过的请告诉我为什么?
页:
[1]