zoukankan      html  css  js  c++  java
  • centos 7编译安装apache

    1.安装工具和依赖包

    yum install unzip
    yum -y install gcc gcc-c++

    2.创建软件安装目录
    mkdir /usr/local/{apr,apr-util,apr-iconv,httpd}

    3.解压软件文件
    tar -zxvf httpd.tar.gz
    tar -zxvf apr.tar.gz
    tar -zxvf apr-iconv.tar.gz
    tar -zxvf apr-util.tar.gz
    tar -zxvf pcre.tar.gz

    4.编译安装


    ./configure --prefix=/usr/local/apr
    make
    make install

    在执行configure可能会出现

     rm: cannot remove `libtoolT': No such file or directory错误信息。

    网上查阅了一下资料,提示编辑configure这个文件,将 $RM “$cfgfile” 那行注释掉 ,然后重新编译即可。

    ./configure --prefix=/usr/local/pcre

    make

    make install

    简洁安装

    将apr-1.5.2与apr-util-1.5.4重命名为apr和apr-util复制到apache源代码srclib目录下

    mv apr apr-util httpd/srclib
    ./configure prefix=/usr/local/httpd --with-pcre=/usr/local/pcre/bin/pcre-config --with-included-apr --enable-so

    make

    make install 

    5.验证安装是否成功

    cd /usr/local/httpd

    ./apachectl -k start 

    6.添加开机启动

    cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd

    打开 vi /etc/rc.d/init.d/httpd
    在#!/bin/sh 下面加上
    #chkconfig: 2345 10 90
    #description: Activates/Deactivates Apache Web Server
    chkconfig --add httpd
    chkconfig httpd on

    7.apache编译选项

      --enable-socache-memcache memcache small object cache provider
      --enable-socache-dc     distcache small object cache provider
      --enable-so             DSO capability. This module will be automatically
                              enabled unless you build all modules statically.
      --enable-watchdog       Watchdog module
      --enable-macro          Define and use macros in configuration files
      --enable-dbd            Apache DBD Framework
      --enable-bucketeer      buckets manipulation filter. Useful only for
                              developers and testing purposes.
      --enable-dumpio         I/O dump filter
      --enable-echo           ECHO server
      --enable-example-hooks  Example hook callback handler module
      --enable-case-filter    Example uppercase conversion filter
      --enable-case-filter-in Example uppercase conversion input filter
      --enable-example-ipc    Example of shared memory and mutex usage
      --enable-buffer         Filter Buffering
      --enable-data           RFC2397 data encoder

     

  • 相关阅读:
    WEB服务器3--IIS7.0安装和配置
    组件与组件之间的通信以及vue2.0中的变化、示例
    Vue2.0组件之间通信
    weex学习资源集合贴
    主题 : 好了,今天周六了,既然没人了,那么开讲多线程编程
    使用vue2.0 vue-router vuex 模拟ios7操作
    iOS开发之遍历Model类的属性并完善使用Runtime给Model类赋值
    iOS开发之使用Runtime给Model类赋值
    AFNetworking到底做了什么?
    webview300毫秒点击问题
  • 原文地址:https://www.cnblogs.com/wangshuyi/p/6102519.html
Copyright © 2011-2022 走看看