zoukankan      html  css  js  c++  java
  • 安装apache

    apache依赖apr,apr-util,pcre

    下载

    http://apr.apache.org 点击from a mirror下载apr和apr-util选择最新的unix source:xxx.tar.gz
    http://www.pcre.org 下载最新,选择xxx.tar.gz,使用yum install pcre会下载最新的pcre2安装
    http://httpd.apache.org 下载选择最新的2.4,选择httpd-2.4.29.tar.gz

    检查httpd服务

    chkconfig --list
    chkconfig httpd off 关闭自启
    service httpd stop

    卸载(这步可省略)

    rpm -qa|grep pcre/apr/apr-util/httpd #不要把pcre全卸载了否则丢失libpcre.so.0就安装不了东西了,如果卸载了可从http://pkgs.org搜索libpcre.so.0下载 
    rpm -e xxx --nodeps 卸载原有安装

    注意:如果装有pcre则不要卸载pcre了
    libpcre.so.o下载地址:https://centos.pkgs.org/6/centos-x86_64/pcre-7.8-7.el6.x86_64.rpm.html
    rpm -ivh pcre-7.8-7.el6.x86_64.rpm

    安装apr

    tar -zxvf apr-1.6.3.tar.gz
    cd apr-1.6.3
    ./configure #默认安装/usr/local/apr 可--prefix=指定目录
    make&&make install

    安装apr-util

    tar -zxvf apr-util-1.6.1.tar.gz
    cd apr-util-1.6.1
    ./configure --with-apr=/usr/local/apr #需要指定依赖的apr目录
    make&&make install

    安装pcre(已有就无需安装)

    tar -zxvf pcre-8.41.tar.gz
    cd pcre-8.41
    ./configure
    make && make install

    安装apache

    tar -zxvf httpd-2.4.29.tar.gz
    cd httpd-2.4.29
    ./configure --prefix=/app/deploy/httpd --enable-mods-shared=all#默认为most,编译模块参数有reallyall,all,most,few和none
    make && make install

    添加为服务

    cp -a /app/deploy/httpd/bin/apachectl  /etc/init.d/httpd

    修改端口/app/deploy/apache2/conf/httpd.conf

    Listen 9999
    ServerName localhost:9999

    启动

    service httpd start
    或者/app/deploy/httpd/bin/apachectl -k start

    访问

    注意:需要gcc/gcc-c++环境,参考nginx安装

  • 相关阅读:
    *****.NET程序首次加載慢問題
    *****How to access a repositoryItemButtonEdit value from a FileDlg
    抽象类与接口的区别
    C#中使用Split分隔字符串的技巧
    *****User Control Instance/DataGridView.Columns in Visual Studio Design
    LinksPersistInfo not work!
    LookUpEdit用法
    Devpress.XtraGrid.GridControl 笔记
    *****动态执行sql
    *****LookUpEdit hide columns
  • 原文地址:https://www.cnblogs.com/maoriaty/p/8245570.html
Copyright © 2011-2022 走看看