手动编译httpd(非yum安装),需要先安装apr和apr-util

> **第一步:安装apr**

典型安装三部曲:
./configure
make
make install

安装apr的时候,configure一直报错:

```
config.status: executing libtool commands
rm: cannot remove `libtoolT': No such file or directory
```
开始先去下载并安装了一下libtool:http://mirror.hust.edu.cn/gnu/libtool/
安装成功后,再次回到apr configure,依然报错。

在网上看了一些材料,都是说要把在configure里面 的RM='$RM'改为RM='$RM  -f'。比如:http://blog.csdn.net/a673341766/article/details/9078011
不过我查看了一下configure文件里面的发现RM是正常的,无错误:
```
: ${CP="cp -f"}
: ${MV="mv -f"}
: ${RM="rm -f"}
```
然后去下载且手动编译autoconf和automake
http://ftp.gnu.org/gnu/automake/?C=M;O=A

```
[root@oc0515384300 Downloads]# cd autoconf-2.69
[root@oc0515384300 autoconf-2.69]# ls
aclocal.m4  BUGS       ChangeLog    ChangeLog.2  config.status  COPYING            doc          lib       Makefile     man     tests
AUTHORS     build-aux  ChangeLog.0  ChangeLog.3  configure      COPYING.EXCEPTION  GNUmakefile  m4        Makefile.am  NEWS    THANKS
bin         cfg.mk     ChangeLog.1  config.log   configure.ac   COPYINGv3          INSTALL      maint.mk  Makefile.in  README  TODO
[root@oc0515384300 autoconf-2.69]# autoreconf --force --install
[root@oc0515384300 autoconf-2.69]# cd ..
[root@oc0515384300 Downloads]# cd libtool-2.4.6
[root@oc0515384300 libtool-2.4.6]# ls
aclocal.m4  bootstrap.conf  ChangeLog    config.log     configure.ac  GNUmakefile  libtool        m4        Makefile.am  README    THANKS
AUTHORS     build-aux       config.h     config.status  COPYING       INSTALL      libtoolize     maint.mk  Makefile.in  stamp-h1  TODO
bootstrap   cfg.mk          config-h.in  configure      doc           libltdl      libtoolize.in  Makefile  NEWS         tests
[root@oc0515384300 libtool-2.4.6]# libtoolize --automake --force
[root@oc0515384300 libtool-2.4.6]# cd ..
[root@oc0515384300 Downloads]# cd automake-1.15
[root@oc0515384300 automake-1.15]# ls
aclocal.m4  bin           ChangeLog   config.status  configure.ac  COPYING  gen-testsuite-part  HACKING  lib  maintainer  Makefile.am  NEWS  PLANS   runtest  THANKS
AUTHORS     bootstrap.sh  config.log  configure      contrib       doc      GNUmakefile         INSTALL  m4   Makefile    Makefile.in  old   README  t
[root@oc0515384300 automake-1.15]# automake --force --add-missing
[root@oc0515384300 automake-1.15]# cd ..
```
再来configure一遍apr看看。依然报错。
看到这篇文章http://bbs.chinaunix.net/thread-3752960-1-1.html,然后在/usr/local/bin这个目录下ls看看,还缺了个m4,再去下载手动编译m4看看:http://ftp.gnu.org/gnu/m4/?C=M;O=A
编译完成后再去/usr/local/bin看看,已经有m4了。

再回去编译apr试试。依然不行- -我要吐血身亡了……没办法,耐着性子再去terminal里输入autoconf,依然没安装成功。如果安装成功应该可以输入autoconf一类的命令。好吧!重新回到autoconf里,make的时候发现一个小问题:

```
/home/elsa/Downloads/autoconf-2.69/build-aux/missing: line 81: help2man: command not found
WARNING: 'help2man' is missing on your system.
         You should only need it if you modified a dependency of a man page.
         You may want to install the GNU Help2man package:
         <http://www.gnu.org/software/help2man/>
make[2]: *** [config.guess.1] Error 127
make[2]: Leaving directory `/home/elsa/Downloads/autoconf-2.69/man'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/elsa/Downloads/autoconf-2.69'
make: *** [all] Error 2
```
难道是这个help2man的问题?再去下载编译看看。
http://ftp.gnu.org/gnu/help2man/?C=M;O=A

因为只有xz结尾的,xz -d xxx.xz解压该help2man文件。
然后完成后回去弄autoconf……再次出现新问题……好像砸电脑啊有木有!

```
WARNING: 'makeinfo' is missing on your system.
         You should only need it if you modified a '.texi' file, or
         any other file indirectly affecting the aspect of the manual.
         You might want to install the Texinfo package:
         <http://www.gnu.org/software/texinfo/>
         The spurious makeinfo call might also be the consequence of
         using a buggy 'make' (AIX, DU, IRIX), in which case you might
         want to install GNU make:
         <http://www.gnu.org/software/make/>
make[2]: *** [autoconf.info] Error 127
make[2]: Leaving directory `/home/elsa/Downloads/autoconf-2.69/doc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/elsa/Downloads/autoconf-2.69'
make: *** [all] Error 2

```
真是特别醉……看来我要把这个/usr/local/bin装得跟/usr/bin/差不多才行,否则...不说了我先去哭一会……

```
#在GNU上有这么一段说明,看来装makeinfo直接装texinfo即可。
makeinfo is part of the texinfo distribution.
Get texinfo-*.tar.gz.

However, all GNU distributions should come with prebuilt info files,
thus makeinfo should not be needed.  If you notice a distribution
that does not come with *.info files, please report it as a bug.
```
然而那个最新更新版本有个.tex结尾的,用gedit可以打开。不过好像只是个文档文件而已。所以直接下载texinfo-6.0的gz版本即可。在configure这个texinfo的过程中,又发现了新的问题:

```
configure: WARNING: Could not find a terminal library among tinfo ncurses curses termlib termcap terminfo
configure: WARNING: The programs from `info' directory will not be built.
```
搜索了一下,发现了一个邮件
http://archive.linuxfromscratch.org/mail-archives/lfs-support/2014-April/046811.html
看样子是要安装gawk和perl,
gawk可以在gnu里下载http://ftp.gnu.org/gnu/gawk/?C=M;O=A
perl得去官网下载https://www.perl.org/get.html
看了一下,perl已经在本地的yum里安装,然而这对我没有啥卵用……因为人家是纯手动编译安装的。所以我还是自己去下载一个编译好了。
```
Libraries have been installed in:
   /usr/local/lib/gawk
```
看到这句话应该是gawk安装成功了。

查看README文档里perl-5.22.0的安装步骤(实际操作中多了make这一步):
```
 ./Configure -des -Dprefix=$HOME/localperl
 make test
 make install
#查看perl的使用文档
 perldoc perl
```
安装时间好长……等的我肚子都饿了……我看到我之前下载的ubuntu.iso都下好了。看来perl真是耗时间大户。看来以后要第一时间安装perl这个东西。预估完成时间超过10分钟。所以小伙伴们如果真的需要安装perl这个东西……真的是可以该干嘛干嘛去……
```
All tests successful.
Elapsed: 527 sec
u=5.06  s=1.08  cu=238.64  cs=19.51  scripts=2219  tests=709261
```
热泪盈眶地看到这一句!Perl终于安装好了。才527秒?8分钟?我不信-。-
好吧我们接着回到texinfo吧。等等……我才输入到make test,也就是还有最后一句make install还没输入……然而我已经输入了make install了。好像没有啥用处。不知道perl安装上了没有。回到texinfo问题也依然存在。这是为啥?

```
ls /usr/local/bin/perl
ls: cannot access /usr/local/bin/perl: No such file or directory
```
没有该文档。看来perl还是没安装上。

>>>>>>>未完待续<<<<<<<<<

Linux上手动编译apache相关推荐

  1. linux环境手动编译安装Nginx实践过程 附异常解决

    linux环境手动编译安装Nginx实践过程 附异常解决 参考文章: (1)linux环境手动编译安装Nginx实践过程 附异常解决 (2)https://www.cnblogs.com/david9 ...

  2. Linux下手动编译shogun

    手动编译shogun,如果按照直接按照官网上的步骤进行,会踩非常多的坑,下面分享一下在下的编译过程,希望能为阁下提供些许借鉴. 1. git clone https://github.com/shog ...

  3. linux上erlang编译安装手记

    以下仅为在本人电脑上通过opt编译安装二郎的步骤手记. 如果在您参照本人安装过程执行时遇到缺少某些erlang编译依赖的库.工具等提示时,请勿慌张,可以谷歌搜索安装具体目标的方法. 首先下载otp_s ...

  4. Linux上安装编译lzo报错:Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run 已解决

    1.详细报错信息 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (build- ...

  5. linux php mysql安装包下载_在linux下手动安装 apache, php, mysql--终极版

    卸载dnf安装的httpd: 纯文本照样可以做到 "有格式的", 通过 "缩进, 空格, tab, 连字符如- , : , ... 等" . 有一个基本原则就是 ...

  6. linux apache 手动安装教程,linux下手动安装apache

    下面是官方文档的要求,必须安装APR.APR-Util.PCRE,gcc-c++等包,文档URL地址http://httpd.apache.org/docs/2.4/install.html. 所以, ...

  7. Linux如何手动编译fcitx文件,linux下安装和配置fcitx中文输入法

    我的系统是ubuntu9.10 系统装好后首先要做的就是安装中文输入法.在网上找了一些中文输入法的资料,最常用的是Fcitx和SCIM输入法.不过好像SCIM的问题比较多,而且据说Fcitx的功能上也 ...

  8. linux上热编译react,如何使用react进行热加载

    一) 安装bable相关命令 5.1 使用 NPM 配置 React 开发环境 image.png 二) 项目打包编译命令相关的安装 image.png 三) 打包运行项目 image.png 四) ...

  9. linux上C++编译过程

    一:哪些代码是在预处理的时候运行的: (1)include头文件 (2)导入库 (3)宏定义 二:编译 编译:是代码转成汇编语言 三:汇编 汇编:将汇编代码转换成二进制,注意:第二步和第三步可以简单理 ...

最新文章

  1. qt 显示加速_新能源 | 吉利星越ePro上市 补贴后17.58万起售 加速更快油耗更低
  2. easyui源码翻译1.32--Messager(消息窗口)
  3. babel从入门到入门
  4. InnoDB Master Thread I/O Rate详解
  5. qq飞车登陆服务器无响应,qq飞车手游进不去怎么回事 为什么进不去游戏
  6. Ubuntu KDE中 Kaccounts-provider 问题
  7. 线程池的原理和连接池的原理
  8. jquery刷新页面
  9. eclipse离线安装插件的两种方法
  10. android 自定义 build.gradle,Gradle for Android 第二篇( Build.gradle入门 )
  11. reflexil教程_【转载】教你使用 Reflexil 反编译.NET
  12. 坦克大战之声音处理类(四)
  13. 性能测试流程(超级详细)
  14. arduino霍尔编码器蓝牙小车代码
  15. 怎么接微信公众号人工服务器,怎么设置微信公众号接入人工客服?
  16. 密码攻防系列文章27-web后台登录口令暴力破解及防御
  17. 阅读材料:信息技术年谱
  18. matlab elseif语句用法,Matlab if…elseif…elseif…else…end语句
  19. AIX 6:新特性概述
  20. AWS CLI 安装配置

热门文章

  1. activiti 6 和 7有什么区别
  2. 小程序和uni-app 通用的表格样式库
  3. 第十一章 Java IO编程
  4. 数据结构索引之杀死攻略(一)
  5. Word字体大小知多少?(转)
  6. 《杜拉拉升职记》读后感
  7. linux 解压war到root_在LINUX下如何将tar压缩文件解压到指定的目录下
  8. 文本框控件TextBox(文本类控件)
  9. 最新智能手机数据出炉!全球2.5亿支产量,OPPO市占率全球第三!
  10. 网易云 NeteaseCloudMusicApi vscode 运行