zoukankan      html  css  js  c++  java
  • 源码包安装httpd,apache

    1、安排装包下载位置(如果出现报错没有apr、apr-util、pcre可以下下载如下安装包)

    wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.41.tar.gz
    wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.7.0.tar.gz
    wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz
    wget https://sourceforge.net/projects/pcre/files/pcre/8.44/pcre-8.44.tar.gz

    2、源码安装httpd依赖包,解决报错没有apr、apr-util、pcre

    yum -y install gcc gcc-c++ make openssl openssl-devel

    tar -xf apr-1.7.0.tar.gz
    tar -xf apr-util-1.6.1.tar.gz
    tar -xf httpd-2.4.41.tar.gz

    2.1、编译安装apr
    cp -r apr-1.7.0 httpd-2.4.41/srclib/apr    (有时候编译安装httpd,指定apr、apr-util会报错,可以把解压包文件拷贝到httpd解压目录下)
    cp -r apr-util-1.6.1 httpd-2.4.41/srclib/apr-util

    cd apr-1.7.0/
    ./configure --prefix=/usr/local/apr && make && make install

    yum install expat-devel(解决安装apr-util报错)

    2.2、编译安装apr-util
    cd apr-util-1.6.1/
    ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr && make && make install

    2.3、编译安装pcre
    tar -xf pcre-8.44.tar.gz
    cd pcre-8.44/
    ./configure --prefix=/usr/local/pcre && make && make install

    3、编译安装apache
    cd httpd-2.4.41/
    ./configure --prefix=/usr/local/apache2 --with-pcre=/usr/local/pcre --with-included-apr --enable-so --enable-dav --enable-dav-fs --enable-maintainer-mode --enable-deflate=shared --enable-expires=shared --enable-headers=shared --enable-rewrite=shared --enable-static-support --with-mpm=prefork --enable-cache --enable-file-cache --enable-rewrite --enable-ssl --enable-proxy --enable-proxy-http --with-sqlite=/usr/local/sqlite/ --with-pcre=/usr/local/pcre/ && make && make install

    4、修改apache配置文件,开启apache
    vim /usr/local/apache2/conf/httpd.conf
    ServerName www.example.com:80 (去掉注释)
    /usr/local/apache2/bin/apachectl start (开启)
    /usr/local/apache2/bin/apachectl stop (关闭)

     

     

  • 相关阅读:
    Display a image in ssrs
    How to transfer parameters from AX to SSRS
    How to get a datatable from AX to SSRS report
    MySQL 8.0 plan optimization 源码阅读笔记
    2017 ES GZ Meetup分享:Data Warehouse with ElasticSearch in Datastory
    JVM服务进程挂掉问题定位查询思路
    [HACK] docker runtime 挂载宿主机目录
    maven 禁止连接外网仓库
    旧项目Makefile 迁移CMake的一种方法:include Makefile
    HBase MVCC 机制介绍
  • 原文地址:https://www.cnblogs.com/shinian12138/p/11316106.html
Copyright © 2011-2022 走看看