查看是否安装 rpm -qa httpd
        如果已安装,则卸载:rpm -e 卸载  --nodeps 不考虑意外
        下载 wget http://mirrors.sohu.com/apache/httpd-2.2.31.tar.gz
            查看大小 ll -sh
        解压 tar xvf
        查看文件readme、install以了解该软件安装方式。
        编译环境部署及若干参数解析:
            ./configure
            --prefix=/application/apache2.2.31  //安装的目录
            --enable-deflate //压缩  对文本压缩
            --enable-expires //过期  浏览器缓存多久
            --enable-headers //激活头
            --enable-modules //激活大多数模块
            --enable-so      //
            --with-mpm=worker //由进程生成的线程(worker)提供服务
            --enable-rewrite  //激活rewrite功能(伪静态)
            
            查看错误:echo $? 或error
            configure: error: in `/root/httpd-2.2.31/srclib/apr':
            configure: error: no acceptable C compiler found in $PATH
            See `config.log' for more details
            configure failed for srclib/apr
                解决办法:yum -y install gcc
            再次检查部署环境,还有错误
            checking for zlib location... not found
            checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures
                解决办法:yum -y install zlib-devel
        make
        make install
        创建软链接:ln -sv apache2.2.31 apache
        查看安装目录 ls          (emeditor软件)
        检查语法:/application/apache/bin/apachectl -t
        启动:/application/apache/bin/apachectl start
            或:/application/apache/bin/httpd -k start
        存在以下错误,不过没关系:
            httpd: apr_sockaddr_info_get() failed for min
            httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
        
        查看是否启动:lsof -i :80    或 ps -ef | grep httpd
        root     30976     1  0 07:51 ?        00:00:00 /application/apache2.2.31/bin/httpd -k start
        daemon   30977 30976  0 07:51 ?        00:00:00 /application/apache2.2.31/bin/httpd -k start
        daemon   30978 30976  0 07:51 ?        00:00:00 /application/apache2.2.31/bin/httpd -k start
        daemon   30979 30976  0 07:51 ?        00:00:00 /application/apache2.2.31/bin/httpd -k start
        daemon   30980 30976  0 07:51 ?        00:00:00 /application/apache2.2.31/bin/httpd -k start
        root     31064  1464  0 07:54 pts/0    00:00:00 grep httpd
        从结果来看已经启动。
        
        在浏览器上访问主机ip,显示 It works!
        
        如果错误,按照以下方式检查:
            1、检查iptables防火墙
            2、检查selinux getenforce
            3、检查端口 80
            4、检查进程
            5、wget或curl
        
        查看已经生效的模块:/application/apache/bin/apachectl -l
            重点查看以下模块:
                /application/apache/bin/apachectl -l|egrep "so|rewrite|header|expire|deflate"
                    mod_deflate.c
                    mod_expires.c
                    mod_headers.c
                    mod_rewrite.c
                    mod_so.c
                
        跟踪进程使用情况 strace
            strace /application/apache/bin/apachectl -M
    
    部署站点:
        cd /application/apache
        cd conf/    //查看配置文件
        grep -i documentroot httpd.conf    //查看网站的根目录
            DocumentRoot "/application/apache2.2.31/htdocs"
        进入网站的根目录,放入网站文件
        刷新浏览器,成功。

apache源码编译安装详解的更多相关文章

  1. linux http服务源码编译安装详解

    相信大家大多都听过linux 的编译安装,但它到底是怎么把源代码变为自己电脑里可以应用的软件哪?今天,小编就以httpd 为例详细讲解一下. 什么是编译安装——编译:将源代码变为机器可执行的代码文件. ...

  2. apache源码编译安装

    源码安装apche 下载apache的源码包文件 访问http://mirror.bit.edu.cn/apache/httpd/,复制如下gz文件的链接地址,并使用wget下载到本地 wget -P ...

  3. 基于cdh5.10.x hadoop版本的apache源码编译安装spark

    参考文档:http://spark.apache.org/docs/1.6.0/building-spark.html spark安装需要选择源码编译方式进行安装部署,cdh5.10.0提供默认的二进 ...

  4. Apache源码编译安装脚本

      Apache是开源的的.最流行的Web服务器软件之一,它快速.可靠并且可通过简单的API扩充,将Perl/Python/PHP等解释器编译到服务器中.Apache的模块超多,以及具有运行稳定,强大 ...

  5. QGIS源码编译步骤详解——官方新方案

    目录 源码下载 环境下载 Cygwin64 OSGeo4W CMAKE Visual Studio 2017 环境配置 配置 编译   方案详细可见源码文件中INSTALL.md. 源码下载   QG ...

  6. centos 7.1 apache 源码编译安装

    Apache编译安装 一,需要软件: http://mirrors.cnnic.cn/apache//apr/apr-1.5.2.tar.gz 1.apr-1.5.2.tar.gz http://mi ...

  7. 源码编译安装MySQL8.0.20

    1 概述 本文章主要讲述了如何从源码编译安装MySQL社区版8.0.20,首先会介绍一些编译安装的相关知识,然后开始编译安装 2 源码编译安装的相关知识 2.1 make与configure make ...

  8. centos7源码编译安装lamp/lnmp

    centos7源码编译安装lamp/lnmp 进程:是包工头(相当于是个门,只管开门关门,不管门内的事儿) 线程:是各种工种(cpu调度的是线程) 进程 是一件事情, 线程 是 同一个时间范围内 同时 ...

  9. Centos7.X 源码编译安装subversion svn1.8.x

    说明:SVN(subversion)的运行方式有两种:一种是基于Apache的http.https网页访问形式:还有一种是基于svnserve的独立服务器模式.SVN的数据存储方式也有两种:一种是在B ...

随机推荐

  1. 【网络流24题】 No.12 软件补丁问题(最小转移代价 最短路)

    [题意] T 公司发现其研制的一个软件中有 n 个错误, 随即为该软件发放了一批共 m 个补丁程序. 每一个补丁程序都有其特定的适用环境, 某个补丁只有在软件中包含某些错误而同时又不包含另一些错误时才 ...

  2. C++实现一个限制对象实例个数的类

    http://www.cnblogs.com/absolute8511/archive/2009/03/02/1649603.html

  3. DLL导出与调用约定

    一般来说,从DLL导出函数有两种方法.一种是使用.def文件:另一种是使用__declspec(dllexport). 使用上面两种方法各有优缺点.使用.def文件就是需要额外维护,当导出函数更改名字 ...

  4. MySQL源码 information_schema新增表

    information_schema是MySQL下的DB, 存储了数据库的数据字典,但OS系统上,并没有information_schema下表的数据和结构文件. 所以,MySQL在针对informa ...

  5. BZOJ3210: 花神的浇花集会

    3210: 花神的浇花集会 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 238  Solved: 119[Submit][Status] Descri ...

  6. Reason: Server is in single user mode. Only one administrator can connect at this time

    单击Start→All Programs→Microsoft SQL Server 2008→Configuration Tools→SQL Server Configuration Manager. ...

  7. JSP丶新闻发布会系统

    新闻发布会 项目所需要的一些实现类 servlet 工具类 1.实现登录功能 前端界面的代码 <form action="<%=path %>/LonginServlet& ...

  8. n维立体空间建模

    n维立体空间建模,基于网格技术,将整个地球信息整体封装,初始进行网格化,选取某一个网格,进行迭代,    迭代的子项依然是网格,迭代的次数为k,网格最终大小可以指定,这种指定决定了立体块的细化率,假设 ...

  9. Project Euler 9

    题意:三个正整数a + b + c = 1000,a*a + b*b = c*c.求a*b*c. 解法:可以暴力枚举,但是也有数学方法. 首先,a,b,c中肯定有至少一个为偶数,否则和不可能为以上两个 ...

  10. 数据库分页--MySQL数据库

    关于实现MySQL分页的最简单的方法就是利用mysql数据库的limit函数:limit [offset,] rows SELECT * FROM 表名称 LIMIT M,N limit 子句可以被用 ...