查看是否安装 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. 【POJ 1984】Navigation Nightmare(带权并查集)

    Navigation Nightmare Description Farmer John's pastoral neighborhood has N farms (2 <= N <= 40 ...

  2. iOS开发UI基础—手写控件,frame,center和bounds属性

    iOS开发UI基础—手写控件,frame,center和bounds属性 一.手写控件 1.手写控件的步骤 (1)使用相应的控件类创建控件对象 (2)设置该控件的各种属性 (3)添加控件到视图中 (4 ...

  3. [转贴]从零开始学C++之STL(一):STL六大组件简介

    一.STL简介 (一).泛型程序设计 泛型编程(generic programming) 将程序写得尽可能通用 将算法从数据结构中抽象出来,成为通用的 C++的模板为泛型程序设计奠定了关键的基础 (二 ...

  4. vs2010自带的报表

    本例用来显示Northwind中的order details表中的数据交分组 1.建立一WinForm程序,并建立一数据库连接,选择order details表,此时会自动建立一个xsd的数据集类,如 ...

  5. linux和windows双系统导致的时间日

    我的博客:www.while0.com系统中有两种时间区分,一为UTC,另一为LT(地方时)两者的区别为时区不同,UTC就是0时区的时间,而我们当地是用的北京时间要慢8小时.linux采用的UTC时间 ...

  6. Java Entry使用

    参考: http://blog.csdn.net/sunmenggmail/article/details/8952712 http://www.cnblogs.com/fstang/archive/ ...

  7. bzoj1486

    这里学了一个新知识叫分数规划这道题目是求∑w[i]/S最小首先二分答案k,然后如果某个环∑w[i]/S<=k即∑w[i]<=k*S-->∑w[i]-k*S<=0--->∑ ...

  8. asp.net EasyUI DataGrid 实现增删改查

    转自:http://www.cnblogs.com/create/p/3410314.html 前台代码: <!DOCTYPE html> <html xmlns="htt ...

  9. 统计难题 HDOJ--2222

    Keywords Search Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)T ...

  10. calabash-android Win10 入门笔记

    参考官方文档:https://developer.xamarin.com/guides/testcloud/calabash/   概述     Calabash是一个BDD的UI自动化验收测试框架, ...