手动编译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.youkuaiyun.com/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还是没安装上。