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

    1 安装apr
    tar -zxvf apr-1.4.2.tar.gz
     cd apr-1.4.2.tar.gz
     ./configure  --prefix=/usr/local/apr
    make  && make install
    2 安装apr-util
    tar -zxvf apr-util-1.3.10.tar.gz
    cd apr-util-1.3.10.tar.gz
     ./configure
    --prefix=/usr/local/apr-util
    --with-apr=/usr/local/apr
     make && make install
    3 安装pcre
    tar -zxvf pcre-8.10.tar.gz
    cd pcre-8.10
    ./configure --prefix=/usr/local/pcre
    make && make install
    4 安装apache
    ./configure
    --prefix=/usr/local/apache
    --with-apr-util=/usr/local/apr-util/
    --with-pcre=/usr/local/pcre/
    --with-apr=/usr/local/apr/
    make && make install

    5. 检查防火墙状态

    查看防火墙状态:
    /etc/init.d/iptables status
    暂时关闭防火墙:
    /etc/init.d/iptables stop
    禁止防火墙在系统启动时启动
    /sbin/chkconfig --level 2345 iptables off
    重启iptables:
    /etc/init.d/iptables restart

    6. 输入服务器ip

    出现,it works 安装成功

    如果出现

    Could not reliably determine the server`s fully qualified domain name,

    编辑httpd.conf文件,搜索"#ServerName",添加ServerName localhost:80

  • 相关阅读:
    4.9Java学习
    我晕了
    注意的
    语句
    第三天JAVA
    JAVA的学习
    JAVA的继承
    JAVA构造方法
    怎么去理解JAVA中类与对象的关系
    Java中三种比较常见的数组排序
  • 原文地址:https://www.cnblogs.com/lovefendi/p/3723706.html
Copyright © 2011-2022 走看看