• centos下httpd-2.4的编译安装


    httpd-2.4编译安装
        依赖于更高版本的apr和apr-util 
        apr 全称  apache portable runtime

    首先停用低版本的httpd服务


        service httpd stop
        chkconfig httpd off
         1)解决依赖关系
             yum -y install pcre-devel
         2)编译安装apr-1.5.0
            tar -xf apr-1.5.0.tar.bz2 
            cd apr-1.5.0
            ./configure --prefix=/usr/local/apr
            make && make install
         3)编译安装apr-util-1.5.2
             tar xf apr-util-1.5.2.tar.bz2
             cd apr-util-1.5.2
             ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
              make && make install


          httpd2.4新特性
            1)MPM支持在运行时装载
                 --enable-mpms-shared=all --with-mpm=event 启用默认的event
            2) 支持event
            3)异步读写
            4) 在每模块及每目录上指定日志级别
            5)每请求配置:<If> <Elseif>
            6) 增强版的表达式分析器
            7) 毫秒级的keepalive timeout
            8)支持主机名的虚拟主机不在需要NameVirtualHost指令
            9) 支持使用自定义变量
            新增一些模块:mod_proxy_fcgi,mod_ratelimit,mod_request,mod_remoteip
            对于基于IP的访问做了修改,不在使用order,allow,deny这些机制;而是统一使用require进行
        4)编译httpd
           tar -xf httpd-2.2.4.tar.bz2 
           cd httpd-2.2.4


           #--enable-modeles=most(常用的)
           ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd24 --enable-so --enable--ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modeles=most --enable-mpms-shared=all --with-mpm=event


           make && make install
           头文件、库文件、帮助文档、二进制
           后续的配置
           1 导出头文件
           ln -sv /usr/local/appache/include /usr/include/httpd
           2 导出库文件
            ldconfig -p 显示当前系统的库文件


           3 导出帮助文件
            vim /etc/man.config


    MANPATH /usr/local/apacheman


    man -M /usr/local/apache/man httpd
           4 修改环境变量


           输出二进制程序


           vim /etc/profile.d/httpd.sh
           export PATH=/usr/local/apache/bin:$PATH


           . /etc/profile.d/httpd.sh


           httpd -V


           启动apache
           apachectl start


           访问进行验证
           http://192.168.8.39
  • 相关阅读:
    Spring Annotation注解进行aop的学习
    使用ADO读取SQL数据库
    GetInventTable组装SQL语句使用通配符
    获取当前用户所属的所有仓位,DictRelation,
    UnitConvert,单位换算,单位转换
    数字货币书写转英文货币书写
    导出xml
    存储过程IN参数疑难问题解决方法
    TempTable 临时表
    多栏报表 多列报表
  • 原文地址:https://www.cnblogs.com/reblue520/p/6239889.html
Copyright © 2020-2023  润新知