zoukankan      html  css  js  c++  java
  • linux下安装apache


    1:Apache 官方网http://httpd.apache.org/下载所需安装包 httpd-2.4.10.tar.gz
       
    2: 上传到服务器  目录自行决定  tar -zxvf 3:mv httpd-2.4.10 apache
        cd apache
        设置安装参数,命令如下:
       ./configure --prefix=/usr/local/apache --enable-module=so 


    4:可能会出现以下错误 
       checking for APR... no configure: error: APR not found . Please read the documentation.
     则需要安装apr-1.4.2.tar.gz 
    5:下载apr-1.4.2.tar.gz 
       a):上传到服务器,tar -zxvf apr-1.4.2.tar.gz  
         b): cd apr-1.4.2
         c):  ./configure 
       d):make , make install


    6:再次检查编译环境出现  ,可能会出现以下错误 


           checking for APR-util... no configure: error: APR-util not found . Please read the documentation.


    7:下载apr-util-1.3.9.tar.gz
       a):上传到服务器,tar -zxvf apr-util-1.3.9.tar.gz
         b): cd apr-util-1.3.9
         c):  ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
       d):make , make install
          
    8再次检查编译环境出现  可能./configure仍提示APR-util not found,增加--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util后出现
     
    configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/


    9:下载pcre-8.10.zip


       a):上传到服务器,unzip -o pcre-8.10.zip
         b): cd pcre-8.10
         c): ./configure --prefix=/usr/local/pcre
       d):make , make install


    10继续安装Apache/httpd
    ./configure  --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pare
    make
    make install 


    11:进入到/usr/local/apache  修改PATH环境变量,       在登录用户的home目录打开.bash_profile,在文件中添加一行       PATH=$PATH:/usr/local/apache/bin
    12: apachectl start  启动  默认端口:80
    13:http://ip:80  出现it works!表示正常配置。

    14:说明:文档中出现的路径都是我自己服务器路径,并且注意安装版本,其他可能存在不兼容问题,
    http://download.csdn.net/detail/tangyuanshark/7713369 
    这里的几个安装文件我已经测试,正常安装。



  • 相关阅读:
    UVALive2678子序列
    UVA11549计算机谜题
    UVA11520填充正方形
    LA3635派
    UVALive3971组装电脑
    记录未完成题目
    SPOJ 6219 Edit distance字符串间编辑距离
    ACM组队安排-——杭电校赛(递推)
    逆袭指数-——杭电校赛(dfs)
    油菜花王国——杭电校赛(并查集)
  • 原文地址:https://www.cnblogs.com/supertang/p/4097011.html
Copyright © 2011-2022 走看看