编译最新的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. 编写unit test以及自动化测试WebDriver

    http://msdn.microsoft.com/en-us/library/hh694602.aspx#BKMK_Quick_starts   http://www.seleniumhq.org/ ...

  2. [深入浅出Windows 10]实现饼图控件

    13.2 实现饼图控件 上一小节讲解了动态生成折线图和区域图,对于简单的图形这样通过C#代码来生成的方式是很方便的,但是当我们的图表要实现更加复杂的逻辑的时候,这种动态生成的方式就显得力不从心了,那就 ...

  3. [WP8.1UI控件编程]SemanticZoom控件实现分组列表

    11.1.5 SemanticZoom实现分组列表 SemanticZoom控件可以让用户实现一种更加高级的列表,这种列表可以对列表的项目进行分组,同时这个SemanticZoom控件会提供两个具有相 ...

  4. 【异常】java.lang.LinkageError: loader constraints violated

    [问题背景]      南非客户帐单提醒功能过程中的一个问题,当启动服务器后,后台报java.lang.LinkageError: loader constraints violated when l ...

  5. tableFooterView中的按钮点击没反应

    一,经历 1.查了按钮没有响应的几个方法,排除了是用户交互设置为 NO 的情况. 2.然后打印了一下tableFooterView,尽然发现其高度为0,而且我也没有设置 frame, 却可以显示按钮, ...

  6. weblogic 11g 配置db2数据源

    配置db2数据源可以直接在包里面配置,不需要专门在服务器上配置数据源. 在11g版本前要配置db2数据源是需要增加包,后续的版本处理了这个问题. 1. 将C:\Program Files\SQLLIB ...

  7. linux 运行可执行文件version `GLIBC_2.17' not found

    http://www.cnblogs.com/q191201771/p/3875316.html root@socfpga:/media/ram/nfs/dvb# ./a.out ./a.: vers ...

  8. MySQL连接池

    1. using System; using System.Collections; using MySql.Data.MySqlClient; namespace Helper { /// < ...

  9. light oj 1047 - Neighbor House 动态规划

    题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87730#problem/C 题目: Description The peopl ...

  10. JavaScript_Math函数

    JavaScript_Math函数与属性按功能分类 Math三角函数与属性 Math.sin() -- 返回数字的正弦值 Math.cos() -- 返回数字的余弦值 Math.tan() -- 返回 ...