zoukankan      html  css  js  c++  java
  • Apache-rhel5.8环境下编译安装

    Apache安装过程

    Step 1:安装包gcc或gcc-c++
    # yum install gcc
    #yum install gcc-c++

    Step 2:安装包APR和APR-Util
    apr-1.4.8.tar.gz apr-util-1.5.2.tar.gz

    # tar -zxf apr-1.4.8.tar.gz
    # cd apr-1.4.8

    新建目录/usr/local/apr,用作安装目录:
    # mkdir /usr/local/apr
    # ./configure --prefix=/usr/local/apr
    # make
    # make install

    安装apr-util
    # ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
    # make
    # make install

    Step 3:安装包PRCE
    # cd pcre-8.33
    #mkdir /usr/local/pcre
    ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
    # make
    # make install

    Step 4:安装Apache Http Server
    # tar zxvf httpd-2.4.6.tar.gz
    #cd httpd-2.4.6

    #./configure --prefix=/opt/data/apache2
    --enable-so
    --enable-mods-shared=most
    --with-mpm=worker
    --with-apr=/usr/local/apr
    --with-apr-util=/usr/local/apr-util
    --with-included-apr
    --with-pcre=/usr/local/pcre

    #make
    #make install

    Step 5:启动Apache服务
    #/opt/data/apache2 /bin/apachectl start

    用浏览器访问http://localhost时提示It works!

    启动报错:
    # /usr/local/apache/bin/apachectl start

    AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using getlnx05.gfg1.esquel.com. Set the 'ServerName' directive globally to suppress this message

    这个时候需要编辑httpd.conf配置文件,添加SeraverName的具体IP地址。
    SeraverName 192.168.1.123:80

    如果从其它电脑连接访问Apache时,输入url地址:http://ip 页面没有显示正常,而上面配置也OK,那么你必须关闭防火墙,有时候甚至需要重启电脑才能OK,重启Apache服务都无效。
    # chkconfig iptables off
    # chkconfig iptables off
    # /usr/local/apache/bin/apachectl restart

  • 相关阅读:
    java 抽象工厂模式简单实例
    java 工厂方法模式简单实例
    java 简单工厂模式实现
    tomcat管理页面上如何查看工程下的文件
    如何用Ecplise部署Web项目到tomcat中
    Servlet中操作文件
    ServletContext是什么
    model1模式变为mv模式,实现业务逻辑和画面的分离
    jdbc操作工具类
    Cookie技术随笔
  • 原文地址:https://www.cnblogs.com/rusking/p/4471409.html
Copyright © 2011-2022 走看看