编译最新的httpd 2.4.18
 
 
编译提示apr版本低于1.4 rpm repo源是1.39的
因此编译apr
下载
apr
apr-util 
apr-iconv
[root@ansible-direc html]# ls
apr-1.5.2          apr-iconv-1.2.1         apr-util-1.5.4         axel-2.4         centos        httpd-2.4.18.tar.gz  nginx-1.9.11.tar.gz
apr-1.5.2.tar.bz2  apr-iconv-1.2.1.tar.gz  apr-util-1.5.4.tar.gz  axel-2.4.tar.gz  httpd-2.4.18  nginx-1.9.11
 
查看三个包的./configure --help|grep apr 看到需要先安 apr 再按 iconv 再安装 util
cd apr-1.5.2
./configure --prefix=/usr/local/apr 
make
make install
cd ../apr-iconv-1.2.1
./configure --prefix=/usr/local/apr-icon --with-apr=/usr/local/apr/
make
make install
cd ../apr-util-1.5.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/ 
make
make install
cd ../httpd-2.4.18
rpm -e --nodeps httpd
./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd/httpd.conf --with-so --with-apr-util=/usr/local/apr-util/  #其他参数需要自选
make
make install
启动
 
[root@ansible-direc html]# /usr/local/apache/bin/apachectl stop
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[root@ansible-direc html]# lsof -i :80
[root@ansible-direc html]# /usr/local/apache/bin/apachectl start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[root@ansible-direc html]# lsof -i :80
COMMAND    PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
httpd   100033   root    4u  IPv6 170557      0t0  TCP *:http (LISTEN)
httpd   100034 daemon    4u  IPv6 170557      0t0  TCP *:http (LISTEN)
httpd   100035 daemon    4u  IPv6 170557      0t0  TCP *:http (LISTEN)
httpd   100036 daemon    4u  IPv6 170557      0t0  TCP *:http (LISTEN)
[root@ansible-direc html]# ip ro
192.168.186.0/24 dev eth0  proto kernel  scope link  src 192.168.186.132 
192.168.92.0/24 dev eth1  proto kernel  scope link  src 192.168.92.134 
169.254.0.0/16 dev eth0  scope link  metric 1002 
169.254.0.0/16 dev eth1  scope link  metric 1003 
default via 192.168.186.2 dev eth0 
 
访问 http://192.168.92.134 
 
 
二进制程序:
# vim /etc/profile.d/apache.sh
PATH=/usr/local/apache/bin:/usr/local/apache/sbin:$PATH
export PATH
 
头文件输出给系统:
# ln -sv /usr/local/apache/include /usr/include/httpd
 
 
库文件输出:
# vim /etc/ld.so.conf.d/httpd.conf
加入如下路径
    /usr/local/apache/lib
 
 
 
让系统重新生成库文件路径缓存
# ldconfig
 
注意 加进去不会立即生效,因为我们当前系统上所有库文件,都会事先被加载缓存下来,
缓存到 /etc/ld.so.cache
    但是新加的是找不到,
所以
        要么重启系统
    要么通知系统重新缓存
  ldconfig 命令       通知系统重新缓存库文件
    ldconfig -v   通知系统重新缓存库文件,-v显示过程
        如下 只会去这些库里面找库文件,我们新装的httpd 后面带的库不会被加载
        [root@ansible-direc html]# ldconfig -v |grep "^[^[:space:]]"
/usr/lib64/mysql:
/lib:
/lib64:
/usr/lib:
/usr/lib64:
/lib/i686: (hwcap: 0x0008000000000000)
/lib64/tls: (hwcap: 0x8000000000000000)
/usr/lib64/tls: (hwcap: 0x8000000000000000)
/usr/lib64/sse2: (hwcap: 0x0000000004000000)
/lib/i686/nosegneg: (hwcap: 0x0028000000000000)
 
 
 
 
导出man文件:
 
未导入的时候,我们man是不可以的。要我们在man.config最后面加入路径即可。
 
# vim /etc/man.config
MANPATH /usr/local/apache/man
 
# man httpd
 
或者不加如路径直接-M看
    man -M /usr/local/apache/man httpd

http-2.4.18 安装的更多相关文章

  1. Apache2.4.23+PHP5.6.30+MySQL5.7.18安装教程

    最近在工作中常常接触到PHP,自己也写过一些简单的PHP页面.我们知道PHP是在服务器端运行的脚本语言,因此我们需要配置服务器环境.之前为了省事直接使用的是wamp集成环境,但是突然某一天领导要求我们 ...

  2. Centos7.3下mysql5.7.18安装并修改初始密码的方法

    Centos7.3下mysql5.7.18安装并修改初始密码的方法 原文链接:http://www.jb51.net/article/116032.htm 作者:Javen205 字体:[增加 减小] ...

  3. windows版mysql5.7.18安装

    windows版mysql5.7.18安装 初始化命令:C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file=& ...

  4. CentOS 6.9上安装Mysql 5.7.18 安装

    CentOS 6.9上安装Mysql 5.7.18 安装 下载地址:https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.18-linux-g ...

  5. Ubuntu 18 安装搜狗输入法

    Ubuntu 18 安装搜狗输入法: 1. 搜狗输入法官网下载对应的Linux输入法 2. 双击 刚刚下载好的 deb 文件 3. 点击 install(安装) 4. 在 settings(系统设置) ...

  6. Fedora 18 安装前指南

    Secure Boot 与 Win 8   随着 Win8 的发布,先前关于 Secure Boot 和 UEFI 的诸多猜测也得到了证实,Fedora 18 也将如同当初计划的那样使用 shim + ...

  7. Fedora 18安装Google输入法和云拼音

    由于sunpinyin的词库选词太不准,网友推荐在Fedora 18下使用谷歌拼音及云拼音,于是想要尝试下怎么样.由于fedora 源中谷歌拼音所以选择自行编译,做下记录以备份. #安装fcitx $ ...

  8. Navicat Premium 12.0.18安装与激活(转)

    转载:https://www.jianshu.com/p/42a33b0dda9c 一.Navicat Premium 12下载 Navicat Premium 12是一套数据库开发管理工具,支持连接 ...

  9. win10+anaconda环境下pyqt5+qt tools+eric6.18安装及汉化过程

    最近需要用python编写一个小程序的界面,选择了pyqt5+eric6的配套组合,安装过程中遇到一些坑,特此记录.参考书籍是电子工业出版社的<PyQt5快速开发与实战>. 因为我使用an ...

随机推荐

  1. angularjs 实现 文件拖拽,缩略图显示

    成果图: main-hugeScreen.html <div class="hbox hbox-auto-xs hbox-auto-sm" ng-controller=&qu ...

  2. 挂载磁盘linux

    1. 用mkfs命令在/dev/sdb上创建ext4文件系统 1.1 mkfs命令 在设备上创建文件系统 mkfs [options] device 参数 device 为要在其上面创建文件系统的设备 ...

  3. 深入理解Java:注解(Annotation)基本概念

    转自:http://www.cnblogs.com/peida/archive/2013/04/23/3036035.html 竹子-博客(.NET/Java/Linux/架构/管理/敏捷) 什么是注 ...

  4. Codeforces Round #353 (Div. 2) A. Infinite Sequence

    Vasya likes everything infinite. Now he is studying the properties of a sequence s, such that its fi ...

  5. BZOJ1036[ZJOI2008]树的统计Count 题解

    题目大意: 一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w.有一些操作:1.把结点u的权值改为t:2.询问从点u到点v的路径上的节点的最大权值 3.询问从点u到点v的路径上的节点的权值和 ...

  6. NOIp 2013 #1 积木大赛 Label:有趣的模拟

    题目描述 春春幼儿园举办了一年一度的“积木大赛”.今年比赛的内容是搭建一座宽度为n的大厦,大厦可以看成由n块宽度为1的积木组成,第i块积木的最终高度需要是hi. 在搭建开始之前,没有任何积木(可以看成 ...

  7. 自己收集原生js-2014-2-23

    (function(){})( window.EventUtil={ addHandler:function(element,type,handler){ // alert(1); if(elemen ...

  8. C++的STL中vector内存分配方法的简单探索

    STL中vector什么时候会自动分配内存,又是怎么分配的呢? 环境:Linux  CentOS 5.2 1.代码 #include <vector> #include <stdio ...

  9. C#常用方法二

    public sealed class StringTool { /// <summary> /// 将txt文件读入字符串 /// </summary> /// <pa ...

  10. 使用 CSS 去掉 iPhone 网页上按钮的超大圆角以及文本框圆角默认样式

    使用 iPhone 上的浏览器去浏览网页的时候,按钮总是显示超大圆角且颜色由上而下渐变的样式,显得超级恶心,而且文本框也会有一定的圆角,但是我们自己定义 border-radius 也没有效果,经过搜 ...