Linux下安装httpd,apr,apr-util,pcre错误解决
2010-12-18 16:28
495 查看
Fedora12安装之后,默认就有了httpd,如果没有,需要到http://httpd.apache.org/手动下载,编译。
为了本次演示,我专门卸载了原有的httpd,重新下载并安装apache。卸载方法:yum -e httpd.
1:到apache官方网站 http://httpd.apache.org/download.cgi 下载最新版本的apache,然后解压,执行如下命令:
./configure –prefix=/root/soft/apache
configure: error: APR not found. Please read the documentation.
2:提示缺少apr,下载http://apache.freelamp.com/apr/ ,编译安装完成apr之后,继续编译apache.
3:编译( ./configure --prefix=/root/soft/apr-util –with-apr=/root/soft/apr)
configure: error: APR-util not found. Please read the documentation
4:缺少apr-util,下载编译apr-util之后,继续编译apache
/configure --prefix=/root/soft/apache --with-apr=/root/soft/apr/
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
5:再次提示缺少pcre,下载之http://sourceforge.net/projects/pcre/ 编译 安装(我这里均安装在/root/soft目录里,例如./configure --prefix=/root/soft/pcre)
./configure --prefix=/root/soft/apache --with-apr=/root/soft/apr/ --with-apr-util=/root/soft/apr-util/
6:然后就可以编译通过了。
7:照例make ,make install,然后到/root/soft/apache/bin目录里,执 行./apachectl start,启动httpd服务,在浏览器中输入127.0.0.1进行测试,可 以出来网页,但是提示403 Forbidden,因为我的www目录默认在/root/soft/apache/htdocs目录,该目录是root权限的目录,web用户是无权限访问的,修改apache/conf/httpd.conf。把DocumentRoot 修改为 /var/www/html (可以在var下面新建这些目录) ,同时还需要修改<Directory "/root/soft/apache/htdocs">至<Directory "/var/www/html/">,保存,执行apachectl restart,即可
8:apache在linux默认是支持ipv4/ipv6的,在浏览器中输入[::1],期待已久的网页出现啦...
Enjoy It!
附:
1:在configure的时候,如果遇到缺少其他软件,可以先看一下help,例如本次安装过程中如果提示缺少apr,那么
./configure –help|grep apr
2:我的apache的编译命令:
./configure --prefix=/root/soft/apache --withpr=/root/soft/apr --with-apr-util=/root/soft/apr-util/ --with-pcre=/root/soft/pcre/ --enable-so
为了本次演示,我专门卸载了原有的httpd,重新下载并安装apache。卸载方法:yum -e httpd.
1:到apache官方网站 http://httpd.apache.org/download.cgi 下载最新版本的apache,然后解压,执行如下命令:
./configure –prefix=/root/soft/apache
configure: error: APR not found. Please read the documentation.
2:提示缺少apr,下载http://apache.freelamp.com/apr/ ,编译安装完成apr之后,继续编译apache.
3:编译( ./configure --prefix=/root/soft/apr-util –with-apr=/root/soft/apr)
configure: error: APR-util not found. Please read the documentation
4:缺少apr-util,下载编译apr-util之后,继续编译apache
/configure --prefix=/root/soft/apache --with-apr=/root/soft/apr/
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
5:再次提示缺少pcre,下载之http://sourceforge.net/projects/pcre/ 编译 安装(我这里均安装在/root/soft目录里,例如./configure --prefix=/root/soft/pcre)
./configure --prefix=/root/soft/apache --with-apr=/root/soft/apr/ --with-apr-util=/root/soft/apr-util/
6:然后就可以编译通过了。
7:照例make ,make install,然后到/root/soft/apache/bin目录里,执 行./apachectl start,启动httpd服务,在浏览器中输入127.0.0.1进行测试,可 以出来网页,但是提示403 Forbidden,因为我的www目录默认在/root/soft/apache/htdocs目录,该目录是root权限的目录,web用户是无权限访问的,修改apache/conf/httpd.conf。把DocumentRoot 修改为 /var/www/html (可以在var下面新建这些目录) ,同时还需要修改<Directory "/root/soft/apache/htdocs">至<Directory "/var/www/html/">,保存,执行apachectl restart,即可
8:apache在linux默认是支持ipv4/ipv6的,在浏览器中输入[::1],期待已久的网页出现啦...
Enjoy It!
附:
1:在configure的时候,如果遇到缺少其他软件,可以先看一下help,例如本次安装过程中如果提示缺少apr,那么
./configure –help|grep apr
2:我的apache的编译命令:
./configure --prefix=/root/soft/apache --withpr=/root/soft/apr --with-apr-util=/root/soft/apr-util/ --with-pcre=/root/soft/pcre/ --enable-so
相关文章推荐
- linux安装httpd时遇到的APR (APR-util,pcre)not found的问题, 以及make时碰到的问题
- APR-util not found pcre-config for libpcre not found. 错误解决方法
- Linux Apache 启动时错误httpd: apr_sockaddr_info_get() failed for host.localdomain解决记录
- centos编译apahce时出现httpd-2.2.22/srclib/apr-util错误的解决方法
- 在linu系统安装apache全过程(httpd、apr、apr-util、pcre)以及进行相应配置
- 手动编译安装httpd2.4.20 pcre-config错误解决
- linux下pip安装mysql-python的错误解决方法
- 解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- 如何解决linux下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- [Linux]安装Matlab错误解决
- 解决kali linux 2.0(2016.01)的安装内核头部出现错误:E: Unable to locate package linux-headers-4.3.0-kali1-amd64
- VirtualBox 安装 Linux时 报错This kernel requires an X86-64 CPU,but only detected an i686 CPU错误的解决办法
- apache安装错误error: APR not found解决办法
- linux安装nginx的常见错误解决(转载)
- 【linux】安装mysql出现 no curses错误解决方法
- linux 安装 apache + tomcat (apr,apr-util),jk模式
- linux宿主机上virtual box 安装 xp声卡驱动错误,没声音的问题解决
- VirtualBox 安装 Linux时 报错This kernel requires an X86-64 CPU,but only detected an i686 CPU错误的解决办法
- 源码安装Apache,报错:Cannot use an external APR with the bundled APR-util和httpd: Could not reliably determine the server's fully qualified domain name, using
- linux 软件包安装常见错误及解决方法