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

  • 相关阅读:
    【Flutter学习】之绘画实例(二)
    【Flutter学习】之绘画实例(一)
    【Flutter学习】之动画实现原理浅析(三)
    【Flutter学习】之动画实现原理浅析(二)
    NopCommerce支持多种类型的数据库
    NopCommerce 多数据库方案
    开发程序需要注意的点
    基于SVN的项目管理——集中与分散
    JS代码优化小技巧
    开发日记:中控PUSH协议
  • 原文地址:https://www.cnblogs.com/mywebnumber/p/5849671.html
Copyright © 2011-2022 走看看