编译最新的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. ORACLE11g JDBC Driver

    http://blog.163.com/z_rx/blog/static/276363762011312947507/ ORACLE服务器端安装程序找到相应目录"x$\app\Adminis ...

  2. Codeforces Testing Round #10 B. Balancer

    水题,只要遍历一遍,不够平均数的,从后面的借,比平均数多的,把多余的数添加到后面即可,注意数据范围 #include <iostream> #include <vector> ...

  3. 【BZOJ】3240: [Noi2013]矩阵游戏

    题意 给出\(n, m(1 \le n, m \le 10^{1000000})\),求\(f(n, m) \ \mod \ 10^9+7\) $$\begin{cases}f(1, 1) = 1 \ ...

  4. JS中关于比较运算符的问题(a===b)

    之前也会碰到a===b和a==b的表达式,但都没有仔细的看资料,今天看canvas有关的书中提到了,就mark一下: a == b    说明:a与b相等: a ===b  说明:a与b相同,并且类型 ...

  5. Codeforces Round #207 (Div. 1) A. Knight Tournament(STL)

    脑子又卡了...来一发set的,STL真心不熟. #include <stdio.h> #include <string.h> #include <iostream> ...

  6. Controller中使用过滤器

    app.controller('myCtrl',function($scope,$filter){     ... $filter('过滤器名称')(需要过滤的对象,参数1,参数2,...); ... ...

  7. Spring MVC和Struts2的比较(二)

    1.Spring MVC的controller+command object模式比Struts2的Action模式更安全一些.而在Struts2中,自动数据绑定发生在Action对象上.这样,在Act ...

  8. HDU 2955(0-1背包问题)

    题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87125#problem/M 题目: Description The aspir ...

  9. [LintCode] Mini Twitter 迷你推特

    Implement a simple twitter. Support the following method: postTweet(user_id, tweet_text). Post a twe ...

  10. java实现MD5加密

    mport java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class Creat ...