zoukankan      html  css  js  c++  java
  • apachehttpd——Linux/Mac源码安装apachehttpd

    一、首先下载源码

    apr-1.7.0.tar.gz
    apr-util-1.6.1.tar.gz
    httpd-2.4.52.tar.gz
    pcre-master.zip

    地址分别为:

    https://httpd.apache.org/download.cgi#apache24

    https://apr.apache.org/download.cgi

    https://apr.apache.org/download.cgi

    https://gitee.com/keke1718/pcre.git  或 https://ftp.pcre.org/pub/pcre/  

    二、分别解压以上4个源码包

    三、创建目标目录

    mkdir /usr/local/httpd
    mkdir /usr/local/apr
    mkdir /usr/local/apr-util
    mkdir /usr/local/pcre

    四、依次进入各个源码目录,执行编译命令,如下:

    因为有依赖关系,所以注意顺序

    cd ../soft/apache/apr-1.7.0
    ./configure —prefix=/usr/local/apr
    make 
    make install 
    
    cd ../soft/apache/apr-util-1.6.1 
    ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/
    make
    make install 
    
    cd ../soft/apache/pcre-master
    ./configure --prefix=/usr/local/pcre
    make
    make install
    
    cd ../soft/apache/httpd-2.4.52
    ./configure --prefix=/usr/local/httpd -with-apr=/usr/local/apr -with-apr-util=/usr/local/apr-util -with-pcre=/usr/local/pcre/

    五、编缉httpd.conf

    vim /usr/local/httpd/conf/httpd.conf

    DocumentRoot "/usr/local/httpd/htdocs"
    <Directory "/usr/local/httpd/htdocs">
    
    Listen 80

    六、启动httpd

    sudo /usr/local/httpd/bin/apachectl start

    七、访问 http://localhost/,显示如下,It works!

     

  • 相关阅读:
    Python之matplotlib库学习
    Linux相关指令和操作
    ubuntu安装vim
    classfication中使用图像金字塔和sliding windows提高准确率
    ubuntu16.04+caffe+python接口配置
    caffe中 softmax 函数的前向传播和反向传播
    cplusplus解析
    ZStack之ZDApp_Init解析
    Z-Stack ZMain学习
    ZigBee协议学习之网络层
  • 原文地址:https://www.cnblogs.com/xingchong/p/15763545.html
Copyright © 2011-2022 走看看