官网下载最新版本的apache, apr, apr-util

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

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

VirtualBox下CenOS6.4

  apr-1.5.2.tar.gz

  apr-util-1.5.4.tar.gz

  httpd-2.4.16.tar.gz

1 安装gcc

yum install gcc

2 安装apr

./configure

make && make install

3 安装apr-util

./configure --with-apr=/usr/local/apr

make && make install

4 安装Apahce

./configure

如果在编译中出现
1 configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

执行yum install pcre pcre-devel

再次./configure

make && make install

开启服务 /usr/local/apache2/bin/apachetl start

报错:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain.

Set the 'ServerName' directive globally to suppress this message

修改httpd.conf

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

添加 ServerName localhost.localdomain

重新开启服务

注:默认文件位于 /usr/local/apache2/htdocs/index.html

5 将自编译安装的Apache2添加为系统服务

转到该篇

CentOS下编译安装Apache(httpd)的更多相关文章

  1. CentOS 下编译安装Apache

    CentOS 下编译安装Apache 卸载原有的apache 首先从 http://httpd.apache.or 下载apache源码包httpd-2.4.4.tar.gz然后从 http://ap ...

  2. CentOS下编译安装Apache

    与Apache 2.2.x相比,Apache 2.4.x提供了很多性能方面的提升,包括支持更大流量.更好地支持云计算.利用更少的内存处理更多的并发等.除此之外,还包括性能提升.内存利用.异步 I/O的 ...

  3. Linux(CentOS)下编译安装apache

    Centos7.6系统 已经安装lnmp一键环境 想装个apache跑php7 (php7的安装以及与apache的交互在这里: https://www.cnblogs.com/lz0925/p/11 ...

  4. 编译安装Apache httpd和php搭建KodExplorer网盘

    编译安装Apache httpd和php搭建KodExplorer网盘 环境说明: 系统版本    CentOS 6.9 x86_64 软件版本    httpd-2.2.31        php- ...

  5. Linux下编译安装Apache Http Server

    Linux下编译安装Apache Http Server [TOC] 1.下载httpd-2.4.12.tar.bz2 wget http://mirror.bit.edu.cn/apache/htt ...

  6. centos下编译安装lnmp

    centos下编译安装lnmp 本文以centos为背景在其中编译安装nginx搭建lnmp环境. 编译安装nginx时,需要事先安装 开发包组"Development Tools" ...

  7. 转:在CentOS下编译安装GCC

    转:https://teddysun.com/432.html 在CentOS下编译安装GCC 技术  秋水逸冰  发布于: 2015-09-02  更新于: 2015-09-02  6519 次围观 ...

  8. centos手动编译安装apache、php、mysql

    64位centos 5.5手动安装lamp,要求curl.json.pdo_mysql.gd,记录如下. centos 5.4.5.5.5.6的内核都是2.6.18,都可以安装php 5.3. 卸载旧 ...

  9. centos下编译安装mysql5.6

    CentOS 6.4下编译安装MySQL 5.6.14 参考:http://www.cnblogs.com/xiongpq/p/3384681.html 概述: CentOS 6.4下通过yum安装的 ...

随机推荐

  1. html5游戏开发框架之lufylegend开源库件学习记录

    下载地址http://lufylegend.com/lufylegend 引用 <script type="text/javascript" src="../luf ...

  2. localStorage请使用getItem 和setITem

    最近看别人的代码,发现他们在从localStorage里面的时候喜欢用dot来操作,而不是get setItem,记得以前说过这个事.下面再说一次吧. 用dot方式来操作(   每次以'hello'= ...

  3. js预编译

    先来做三个测试 eg1: var a; a = 1; function a() {}; console.log(a); eg2: var a; function a() {}; console.log ...

  4. java中Class对象详解

    java中把生成Class对象和实例对象弄混了,更何况生成Class对象和生成instance都有多种方式.所以只有弄清其中的原理,才可以深入理解.首先要生成Class对象,然后再生成Instance ...

  5. scanf函数与scanf_s函数

    ANSI C中没有scanf_s(),只有scanf(),scanf()在读取时不检查边界,所以可能会造成内存泄露.所以vc++2005/2008中提供了scanf_s(),在最新的VS2013中也提 ...

  6. 《TCP/IP详解》读书笔记

    本书以UNIX为背景,紧贴实际介绍了数据链层.网络层.运输层   一.整体概念   1.各层协议的关系,只讨论四层 各层常见的协议:   网络层协议:IP协议.ICMP协议.ARP协议.RARP协议. ...

  7. 第四十四节,subprocess系统命令模块

    用python执行系命令的相关的模块和函数的功能均在 subprocess 模块中实现,并提供了丰富的功能 call()模块函数 功能:输入系统命令,直接执行命令,返回状态码,只能查看[有参] 使用方 ...

  8. ios小功能

    1.开 发过程中,我们通过http请求,后台返回json数据,而有时数据里某一字段的值为null-,然后我们把此值赋值给 NSArray,NSdictionary,或是NSString,然后我们会判断 ...

  9. Nginx配置性能优化与压力测试webbench【转】

    这一篇我们来说Nginx配置性能优化与压力测试webbench. 基本的 (优化过的)配置 我们将修改的唯一文件是nginx.conf,其中包含Nginx不同模块的所有设置.你应该能够在服务器的/et ...

  10. 缩放系列(一):一个很好的bitmap手势缩放demo(多点触控)

    认识事物都遵循由简入繁的顺序,下面我们想实现一个控件或者一个布局的缩放,先从简单的例子开始吧,我们就以缩放图片做入门. 效果图: 一.要求 利用ScaleGestureDetector这个类实现图片缩 ...