Welcome 微信登录

首页 / 操作系统 / Linux / Linux 安装Apache httpd 缺少关联软

Fedora 12安装之后,默认就有了httpd,如果没有,需要到http://httpd.apache.org/手动下载,编译。为了本次演示,我专门卸载了原有的httpd,重新下载并安装apache。卸载方法:yum -e httpd.1:到apache官方网站 http://httpd.apache.org/download.cgi 下载最新版本的apache,然后解压,执行如下命令:./configure –prefix=/root/soft/apacheconfigure: 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 documentation4:缺少apr-util,下载编译apr-util之后,继续编译apache/configure --prefix=/root/soft/apache --with-apr=/root/soft/apr/ --with-apr-util=/root/soft/apr-util/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/ --with-pcre=/root/soft/pcre6:然后就可以编译通过了。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下面新建这些目录) ,同时还需要修改至,保存,执行apachectl restart,即可8:apache在linux默认是支持ipv4/ipv6的,在浏览器中输入[::1],期待已久的网页出现啦...Enjoy It!附:1:在configure的时候,如果遇到缺少其他软件,可以先看一下help,例如本次安装过程中如果提示缺少apr,那么./configure –help|grep apr2:我的apache的编译命令:./configure --prefix=/root/soft/apache --withpr=/root/soft/apr --with-apr-util=/root/soft/apr-util/ --with-pcre=/root/soft/pcre/ --enable-soFedora 下用root 权限进入X 界面Linux下办公软件OpenOffice五大特点介绍相关资讯      Fedora 
  • Fedora GNOME 的常用快捷键  (04/02/2015 17:38:36)
  • Fedora Core 有望重新复活  (08/15/2013 17:25:09)
  • Fedora 19开发代号投票选出:薛定  (11/16/2012 21:34:24)
  • Fedora Linux 项目诞生十周年  (09/25/2013 05:53:31)
  • Fedora 17 x86_64 安装流程  (11/24/2012 18:09:07)
  • Fedora 18 正式版延期至年底发布  (10/17/2012 19:31:11)
本文评论 查看全部评论 (1)
表情: 姓名: 字数


评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的