编译最新的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. Android LruCache(Picasso内存缓存)

    Cache保存一个强引用来限制内容数量,每当Item被访问的时候,此Item就会移动到队列的头部,当cache已满的时候加入新的item时,在队列尾部的item会被回收. 如果你cache的某个值需要 ...

  2. Android Properties 存储

    1.初始化 private static void initProperties(){ File logFile = new File(Constants.PROGRESS_PROPERTIES); ...

  3. Codeforces Round #235 (Div. 2) B. Sereja and Contests

    #include <iostream> #include <vector> #include <algorithm> using namespace std; in ...

  4. ACM: 强化训练-Inversion Sequence-线段树 or STL·vector

    Inversion Sequence Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%lld & %llu D ...

  5. 【BZOJ3732】 Network Kruskal+倍增lca

    Description 给你N个点的无向图 (1 <= N <= 15,000),记为:1…N. 图中有M条边 (1 <= M <= 30,000) ,第j条边的长度为: d_ ...

  6. 你用java的swing可以做出这么炫的mp3播放器吗?

    这个mp3播放器是基于java的swing编写的,我认为界面还是可以拿出来和大家看一看评一评. 先说说创作的初衷,由于前段时间工作不是很忙,与其闲着,还不如找一些东西来给自己捣腾捣腾,在 之前写的 j ...

  7. c++资源之不完全导引 (转)

    c++资源之不完全导引 (转) 转:http://www.cnblogs.com/suiyingjie/archive/2008/02/24/1079411.html 本文2004年5月首发于< ...

  8. URL编码:不同的操作系统、不同的浏览器、不同的网页字符集,将导致完全不同的编码结果。

    URL编码:不同的操作系统.不同的浏览器.不同的网页字符集,将导致完全不同的编码结果. 因此如果Url中有中文或特殊字符,一定要自己调用函数编码解码,不要让浏览器帮你编码,否则出现了问题会浪费你很多时 ...

  9. linux修改时区为中国时区(北京)

    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

  10. Point Grey FlyCapture 实例汇总

    Example Language Description AsyncTriggerEx C++ Demonstrates some of the basic asynchronous trigger ...