zoukankan      html  css  js  c++  java
  • Linux 安装apache2时候遇到的问题

    下载httpd-2.4.4.tar.gz 解压完后,./configure && make 出现了以下一系列的错误。......

    //***************.................................................................................................................*****************************************//

    最开始提示configure: error: APR not found. Please read the documentation.下载apr-1.4.5.tar.gz 

     tar xvf apr-1.4.5.tar.gz

    cd apr-1.4.5

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

    make && make install

    之后回到apache目录./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr  make 又出现错误:configure: error: APR-util not found. Please read the documentation。那就再下载apr-util-1.3.12.tar.gz

    tar xvf apr-util-1.3.12.tar.gz

    cd apr-util-1.3.12

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

    make && make install

    之后回到apache目录 ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ ; make 出现错误:configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

    查得缺少pcre,下载pcre源码pcre-8.10.tar.gz,还是tar 解压 ,./configure prefix=/usr/local/pcre  当make的时候出现了一个错误:./libtool: line 990: g++: command not found 我去- -。没装g++?,sudo apt-get install g++。之后再make && make install .完事后回到apache目录下。

    执行./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre  然后make && make install OK编译通过。

    /usr/local/apache2/bin/apachectl start 后,在浏览器中输入http://ip   出现It works,即可成功。有的人可能还是访问不成功,可能是防火墙的问题,service iptables stop 即可。起始这种做法不安全,最好是只允许80端口通过。

  • 相关阅读:
    X-Windows桌面
    scp命令详解
    LaTeX排版工具使用
    HTML5的在线视频播放方案
    开源软件大集合
    Linux下视频转换工具:转换,切割,连接,
    互联网产品经理常用软件及工作平台
    centos7安装VLC播放器
    2014年基于Raspberry Pi的5大项目
    天虎科技:全国智能硬件投融资情况大盘点
  • 原文地址:https://www.cnblogs.com/wanhl/p/2969665.html
Copyright © 2011-2022 走看看