zoukankan      html  css  js  c++  java
  • centos 安装 apache2.4

    1. centos 安装 apache2.4

    安装基础依赖:
    # yum install gcc gcc-c++ glibc glibc-devel gd gd-devel zlib zlib-devel libtool-ltdl-devel flex autoconf automake

    apache 需要依赖apr 和 apr-util、apr-iconv、pcre

    所以还需要先安装 apr和apr-util、apr-iconv
    # wget http://apache.fayea.com//apr/apr-1.5.2.tar.gz
    # wget http://apache.fayea.com//apr/apr-util-1.5.4.tar.gz
    # wget http://apache.fayea.com//apr/apr-iconv-1.2.1.tar.gz
    # wget https://sourceforge.net/projects/pcre/files/pcre/7.9/pcre-7.9.zip
    #
    # tar xzvf apr-1.5.2.tar.gz
    # tar xzvf apr-util-1.5.4.tar.gz
    # tar xzvf apr-iconv-1.2.1.tar.gz
    # cd apr-1.5.2
    # ./configure --prefix=/usr/local/apr
    # make
    # make install
    # cd ..
    # cd apr-util-1.5.4
    # ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
    # make
    # make insatll
    # cd ..
    # cd apr-iconv-1.2.1
    # ./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr
    # make
    # make insatll
    #
    # 安装pcre
    # unzip pcre-7.9.zip
    # cd pcre-7.9
    # ./configure --prefix=/usr/local/pcre
    # make && make install

    apache历史版本下载地址:
    # wget http://archive.apache.org/dist/httpd/httpd-2.4.9.tar.gz

    # tar xzvf httpd-2.4.9.tar.gz
    # cd httpd-2.4.9
    # ./configure --prefix=/usr/local/apache --enable-track-vars --enable-cgi --with-config-file-path=/usr/local/apache/conf --with-apr=/usr/local/apr -with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre
    # make
    # make install

    说明:enable-cgi 支持CGI;enable-track-vars 为启动cookie的get/post等追踪功能

    将apache安装为系统服务

    # cp /usr/local/apache/bin/apachectl /etc/init.d/httpd

    # service httpd start

  • 相关阅读:
    DevExpress 控件使用之GridControl基本属性设置
    GridControl基础设置(一)
    GitHub Top 100 简介
    Swift3.0 单例模式实现的几种方法-Dispatch_Once
    获取cell数组
    Xcode Apple Mach-O Linker Error Group错误
    Xcode运行设备由iphone/ipad变为my mac的解决方
    iOS 修改图片颜色
    iOS——UIActivityIndicatorView活动指示器
    iOS 消息处理之performSelector
  • 原文地址:https://www.cnblogs.com/mywebnumber/p/5849671.html
Copyright © 2011-2022 走看看