zoukankan      html  css  js  c++  java
  • 在linux系统上源码安装httpd前的准备

    1.1 前期准备
    apt-get install lrzsz
    apt-get install gcc //yum install -y gcc gcc-c++
    apt-get update
    apt-get install build-essential

    1.2 apr
    wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.5.2.tar.gz
    tar zxvf apr-1.5.2.tar.gz
    cd apr-1.5.2/
    ./configure
    make
    make install

    1.3 apr-util
    wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.5.4.tar.gz
    tar zxvf apr-util-1.5.4.tar.gz
    cd apr-util-1.5.4/
    ./configure --with-apr=/usr/local/apr
    make
    make install


    1.4 pcre
    wget http://ftp.exim.llorien.org/pcre/pcre-8.36.tar.gz
    tar zxvf pcre-8.36.tar.gz
    cd pcre-8.36/
    ./configure
    (linux下安装安装pcre-8.32
    ./configure --prefix=/usr/local/pcre 出现以下错误
    configure: error: You need a C++ compiler for C++ support
    解决办法:yum install -y gcc gcc-c++)
    (遇某一失败,则执行apt-get install build-essential)
    make
    make install

    1.5 zlib
    将安装包放在指定目录下
    tar zxvf zlib-1.2.8.tar.gz
    cd zlib-1.2.8/
    ./configure
    (遇某一失败,执行vim Makefile)
    make
    make install

    1.6 httpd-2.4.23
    将安装包放在指定目录下
    tar zxvf httpd-2.4.23.tar.gz
    cd httpd-2.4.23/
    ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --with-pcre=/usr/local/pcre/bin/pcre-config --with-zlib-1.2.8=/usr/local/zlib-1.2.8 --enable-so
    make
    make install


    可能问题:
    ① 如./configure时出错提示E: Unable to locate package crypto,E: Unable to locate package libssl
    则执行:
    cp /usr/local/ssl/lib/libssl.so /usr/lib/
    cp /usr/local/ssl/lib/libcrypto.so /usr/lib/
    重新执行
    ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --with-pcre=/usr/local/pcre/bin/pcre-config --with-zlib-1.2.8=/usr/local/zlib-1.2.8 --enable-so
    make
    make install

    ②提示zlib和pcre路径问题,则
    ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --enable-so
    make
    make install

     
  • 相关阅读:
    7-3.自定义列表
    GoLang 使用协程与管道随机生成姓名
    [Unity3D] 点击物品显示物品信息
    [Unity3D] 碰撞物体添加到背包
    [PS] DDS文件导入插件
    [Unity3D] 给角色添加武器
    [Unity3D] 刚体 碰撞器 触发器
    [Unity3D] 物体的几种移动方法
    [Unity3D] 解决导入的模型出现闪烁的问题
    [Unity3D] 人物角色跳跃(动画跳跃&刚体跳跃)
  • 原文地址:https://www.cnblogs.com/jxba/p/9221025.html
Copyright © 2011-2022 走看看