• linux安装apache


    http://httpd.apache.org/download.cgi 下载最新版

    1、下载依赖包

    cd opt

    下载APR:

    wget http://mirror.bit.edu.cn/apache/apr/apr-1.6.3.tar.gz

    下载APR-Util:

    wget http://mirror.bit.edu.cn/apache/apr/apr-util-1.6.1.tar.gz

    下载PCRE:

    wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.42.tar.gz

    下载HTTPD:

    wget https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.33.tar.gz

    2、解压依赖包
    tar -xzvf apr-1.6.3.tar.gz
    tar -xzvf apr-util-1.6.1.tar.gz
    tar -xzvf pcre-8.42.tar.gz

    3、安装apr-1.6.3
    进入安装目录
    cd /opt/apr-1.6.3/
    安装及编译
    ./configure --prefix=/usr/local/apr
    make && make install

    后面可能还会出现找不到apr-util
    进入安装目录
    cd /opt/apr-util-1.6.1/
    安装及编译
    ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config
    make && make install

    后面可能还会出现找不到pcre
    进入安装目录
    cd /opt/pcre-8.42/
    安装及编译
    ./configure --prefix=/usr/local/pcre
    make && make install

    安装apache
    进入安装目录
    cd /opt/httpd-2.4.33/
    安装及编译
    需要用--with参数指定我们刚才安装的依赖包位置

    ./configure --prefix=/usr/local/web/apache --enable-shared=max --enable-module=rewirte --enable-module=so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre

    启动apache: /usr/local/web/apache/bin/apachectl start

  • 相关阅读:
    nginx下根据指定路由重定向
    Ubuntu下配置apache开启https
    php+websocket搭建简易聊天室实践
    rsync + git发布项目
    nginx下配置Yii2 rewrite、pathinfo等
    新装NGINX重启,出现错误 nginx: [error] open() "/usr/local/nginx/logs/nginx.pid"
    wamp mysql服务意外停止
    PHP异步请求
    php curl_errno 60
    php开启fileinfo扩展
  • 原文地址:https://www.cnblogs.com/beebe/p/9041250.html
Copyright © 2020-2023  润新知