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

  • 相关阅读:
    postman自动化测试断言
    sqlserver 数据库查询 数据库连接情况和 什么语句造成死锁
    asp.net core 中async/await
    2019年4月15日 查询功能1
    2019年3月21日 装饰器进阶2-带参数的装饰器
    2019年3月10日 装饰器进阶-模拟session
    2019年3月9日 解压序列
    2019年2月24日 装饰器基本实现
    2019年2月23日 装饰器1:高阶函数,函数嵌套
    2019年2月3日 装饰器,小年夜
  • 原文地址:https://www.cnblogs.com/rusking/p/4471409.html
Copyright © 2011-2022 走看看