(1) [root@blackbear ~]# date 四 7月 31 07:48:42 CST 2014 [root@blackbear ~]# uname -a Linux blackbear.kmvs.km.edu.tw 3.9.5-301.fc19.i686.PAE #1 SMP Tue Jun 11 19:46:44 UTC 2013 i686 i686 i386 GNU/Linux [root@blackbear ~]#
(2) [root@blackbear lnx]# wget http://apache.stu.edu.tw//httpd/httpd-2.4.10.tar.gz --2014-07-31 07:51:33-- http://apache.stu.edu.tw//httpd/httpd-2.4.10.tar.gz 正在查找主機 apache.stu.edu.tw (apache.stu.edu.tw)... 120.119.118.1, 2001:e10:c41:eeee::1 正在連接 apache.stu.edu.tw (apache.stu.edu.tw)|120.119.118.1|:80... 連上了。 已送出 HTTP 要求,正在等候回應... 200 OK 長度: 6820719 (6.5M) [application/x-gzip] Saving to: ‘httpd-2.4.10.tar.gz’
100%[======================================>] 6,820,719 4.08MB/s in 1.6s
2014-07-31 07:51:35 (4.08 MB/s) - ‘httpd-2.4.10.tar.gz’ saved [6820719/6820719]
[root@blackbear lnx]#
(3) [root@blackbear lnx]# tar xvzf httpd-2.4.10.tar.gz :
httpd-2.4.10/build/aix/README [root@blackbear lnx]#
[root@blackbear lnx]# cd httpd-2.4.10/ [root@blackbear httpd-2.4.10]# ls ABOUT_APACHE CHANGES INSTALL os acinclude.m4 CMakeLists.txt InstallBin.dsp README Apache-apr2.dsw config.layout LAYOUT README.cmake Apache.dsw configure libhttpd.dsp README.platforms apache_probes.d configure.in LICENSE ROADMAP ap.d docs Makefile.in server build emacs-style Makefile.win srclib BuildAll.dsp httpd.dsp modules support BuildBin.dsp httpd.spec NOTICE test buildconf include NWGNUmakefile VERSIONING [root@blackbear httpd-2.4.10]#
(4) [root@blackbear httpd-2.4.10]# ./configure --prefix=/usr/local/apache2 checking for chosen layout... Apache checking for working mkdir -p... yes checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu configure: configure: Configuring Apache Portable Runtime library... configure: checking for APR... no configure: error: APR not found. Please read the documentation. [root@blackbear httpd-2.4.10]#
(5) [root@blackbear httpd-2.4.10]# cd .. [root@blackbear lnx]# wget http://apache.stu.edu.tw//apr/apr-1.5.1.tar.gz --2014-07-31 08:01:29-- http://apache.stu.edu.tw//apr/apr-1.5.1.tar.gz 正在查找主機 apache.stu.edu.tw (apache.stu.edu.tw)... 120.119.118.1, 2001:e10:c41:eeee::1 正在連接 apache.stu.edu.tw (apache.stu.edu.tw)|120.119.118.1|:80... 連上了。 已送出 HTTP 要求,正在等候回應... 200 OK 長度: 1020833 (997K) [application/x-gzip] Saving to: ‘apr-1.5.1.tar.gz’
100%[===================================================================================>] 1,020,833 3.30MB/s in 0.3s
2014-07-31 08:01:33 (3.30 MB/s) - ‘apr-1.5.1.tar.gz’ saved [1020833/1020833]
[root@blackbear lnx]# [root@blackbear lnx]# tar xvzf apr-1.5.1.tar.gz [root@blackbear lnx]# cd apr-1.5.1/ [root@blackbear apr-1.5.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr configure: WARNING: unrecognized options: --with-apr checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu Configuring APR library Platform: i686-pc-linux-gnu checking for working mkdir -p... yes APR Version: 1.5.1 checking for chosen layout... apr checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/root/lnx/apr-1.5.1': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details [root@blackbear apr-1.5.1]#
(6) [root@blackbear lnx]# yum install gcc : Verifying : glibc-2.17-4.fc19.i686 16/16
Installed: gcc.i686 0:4.8.3-1.fc19
Dependency Installed: cpp.i686 0:4.8.3-1.fc19 glibc-devel.i686 0:2.17-20.fc19 glibc-headers.i686 0:2.17-20.fc19 kernel-headers.i686 0:3.14.13-100.fc19 libasan.i686 0:4.8.3-1.fc19 libatomic.i686 0:4.8.3-1.fc19 libmpc.i686 0:1.0.1-1.fc19
Updated: glibc.i686 0:2.17-20.fc19
Dependency Updated: glibc-common.i686 0:2.17-20.fc19 libgcc.i686 0:4.8.3-1.fc19 libgomp.i686 0:4.8.3-1.fc19
Complete! [root@blackbear lnx]# [root@blackbear lnx]# gcc -v 使用內建 specs。 COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.8.3/lto-wrapper 目的:i686-redhat-linux 配置為:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.3-20140624/obj-i686-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.3-20140624/obj-i686-redhat-linux/cloog-install --with-tune=generic --with-arch=i686 --build=i686-redhat-linux 執行緒模型:posix gcc version 4.8.3 20140624 (Red Hat 4.8.3-1) (GCC) [root@blackbear lnx]#
(7) [root@blackbear lnx]# cd apr-1.5.1/ [root@blackbear apr-1.5.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr : rm: cannot remove 'libtoolT': No such file or directory config.status: executing default commands configure: WARNING: unrecognized options: --with-apr [root@blackbear apr-1.5.1]#
(8) [root@blackbear apr-1.5.1]# cd .. [root@blackbear lnx]# wget http://apache.stu.edu.tw//apr/apr-util-1.5.3.tar.gz --2014-07-31 08:25:41-- http://apache.stu.edu.tw//apr/apr-util-1.5.3.tar.gz 正在查找主機 apache.stu.edu.tw (apache.stu.edu.tw)... 120.119.118.1, 2001:e10:c41:eeee::1 正在連接 apache.stu.edu.tw (apache.stu.edu.tw)|120.119.118.1|:80... 連上了。 已送出 HTTP 要求,正在等候回應... 200 OK 長度: 874462 (854K) [application/x-gzip] Saving to: ‘apr-util-1.5.3.tar.gz’
100%[===================================================================================>] 874,462 1.56MB/s in 0.5s
2014-07-31 08:25:46 (1.56 MB/s) - ‘apr-util-1.5.3.tar.gz’ saved [874462/874462]
[root@blackbear lnx]# [root@blackbear lnx]# tar xvzf apr-util-1.5.3.tar.gz [root@blackbear lnx]# cd apr-util-1.5.3/ [root@blackbear apr-util-1.5.3]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking for working mkdir -p... yes APR-util Version: 1.5.3 checking for chosen layout... apr-util checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed Applying apr-util hints file rules for i686-pc-linux-gnu checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file. [root@blackbear apr-util-1.5.3]#
(9) [root@blackbear apr-1.5.1]# ./configure --prefix=/usr \ > --disable-static \ > --with-installbuilddir=/usr/share/apr-1/build : config.status: include/arch/unix/apr_private.h is unchanged [root@blackbear apr-1.5.1]# make : make[1]: Leaving directory `/root/lnx/apr-1.5.1' [root@blackbear apr-1.5.1]# make test : server: apr_socket_sendfile() worked as expected! make[1]: Leaving directory `/root/lnx/apr-1.5.1/test' [root@blackbear apr-1.5.1]#
[root@blackbear apr-1.5.1]# make install : Libraries have been installed in: /usr/lib
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c -m 644 apr.exp /usr/lib/apr.exp /usr/bin/install -c -m 644 apr.pc /usr/lib/pkgconfig/apr-1.pc for f in libtool shlibtool; do \ if test -f ${f}; then /usr/bin/install -c -m 755 ${f} /usr/share/apr-1/build; fi; \ done /usr/bin/install -c -m 755 /root/lnx/apr-1.5.1/build/mkdir.sh /usr/share/apr-1/build for f in make_exports.awk make_var_export.awk; do \ /usr/bin/install -c -m 644 /root/lnx/apr-1.5.1/build/${f} /usr/share/apr-1/build; \ done /usr/bin/install -c -m 644 build/apr_rules.out /usr/share/apr-1/build/apr_rules.mk /usr/bin/install -c -m 755 apr-config.out /usr/bin/apr-1-config [root@blackbear apr-1.5.1]#
(10) [root@blackbear apr-1.5.1]# cd ../apr-util-1.5.3/ [root@blackbear apr-util-1.5.3]# ./configure --prefix=/usr \ > --with-apr=/usr \ > --with-gdbm=/usr \ > --with-openssl=/usr \
[root@blackbear apr-util-1.5.3]# make
: make[1]: Leaving directory `/root/lnx/apr-util-1.5.3' [root@blackbear apr-util-1.5.3]# make test : testreslist : SUCCESS All tests passed. make[1]: Leaving directory `/root/lnx/apr-util-1.5.3/test' [root@blackbear apr-util-1.5.3]# make install : Libraries have been installed in: /usr/lib
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- /usr/bin/install -c -m 644 aprutil.exp /usr/lib /usr/bin/install -c -m 755 apu-config.out /usr/bin/apu-1-config [root@blackbear apr-util-1.5.3]#
(11) [root@blackbear apr-util-1.5.3]# cd ../httpd-2.4.10/ [root@blackbear httpd-2.4.10]# ./configure --enable-so --enable-unique-id --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
: checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.
[root@blackbear httpd-2.4.10]# ./configure --enable-so --enable-unique-id --prefix=/usr/local/apache2 --with-apr=/usr --with-apr-util=/usr : configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/ [root@blackbear httpd-2.4.10]#
(12) [root@blackbear httpd-2.4.10]# cd .. [root@blackbear lnx]# yum install gcc-c++ : Dependency Installed: libstdc++-devel.i686 0:4.8.3-1.fc19
Dependency Updated: libstdc++.i686 0:4.8.3-1.fc19
Complete! [root@blackbear lnx]#
(13) [root@blackbear lnx]# wget http://downloads.sourceforge.net/pcre/pcre-8.35.tar.bz2 :
2014-07-31 11:33:36 (1.46 MB/s) - ‘pcre-8.35.tar.bz2’ saved [1522220/1522220]
[root@blackbear lnx]# [root@blackbear lnx]# tar jxvf pcre-8.35.tar.bz2
[root@blackbear pcre-8.35]# ./configure --prefix=/usr \ > --docdir=/usr/share/doc/pcre-8.35 \ > --enable-unicode-properties \ > --enable-pcre16 \ > --enable-pcre32 \ > --enable-pcregrep-libz \ > --enable-pcregrep-libbz2 \ > --enable-pcretest-libreadline \ > --disable-static : ** Cannot --enable-pcregrep-libz because zlib.h was not found [root@blackbear pcre-8.35]# [root@blackbear pcre-8.35]# ./configure --prefix=/usr --docdir=/usr/share/doc/pcre-8.35 --enable-unicode-properties --enable-pcre16 --enable-pcre32 --disable-static :
Build 8 bit pcre library ........ : yes Build 16 bit pcre library ....... : yes Build 32 bit pcre library ....... : yes Build C++ library ............... : yes Enable JIT compiling support .... : no Enable UTF-8/16/32 support ...... : yes Unicode properties .............. : yes Newline char/sequence ........... : lf \R matches only ANYCRLF ......... : no EBCDIC coding ................... : no EBCDIC code for NL .............. : n/a Rebuild char tables ............. : no Use stack recursion ............. : yes POSIX mem threshold ............. : 10 Internal link size .............. : 2 Nested parentheses limit ........ : 250 Match limit ..................... : 10000000 Match limit recursion ........... : MATCH_LIMIT Build shared libs ............... : yes Build static libs ............... : no Use JIT in pcregrep ............. : no Buffer size for pcregrep ........ : 20480 Link pcregrep with libz ......... : no Link pcregrep with libbz2 ....... : no Link pcretest with libedit ...... : no Link pcretest with libreadline .. : no Valgrind support ................ : no Code coverage ................... : no
[root@blackbear pcre-8.35]# make : make[1]: Leaving directory `/root/lnx/pcre-8.35' [root@blackbear pcre-8.35]# make install
make[3]: Leaving directory `/root/lnx/pcre-8.35' make[2]: Leaving directory `/root/lnx/pcre-8.35' make[1]: Leaving directory `/root/lnx/pcre-8.35' [root@blackbear pcre-8.35]#
(14) [root@blackbear pcre-8.35]# cd ../httpd-2.4.10/ [root@blackbear httpd-2.4.10]# ./configure --enable-so --enable-unique-id --prefix=/usr/local/apache2 --with-apr=/usr --with-apr-util=/usr [root@blackbear httpd-2.4.10]# make : make[1]: Leaving directory `/root/lnx/httpd-2.4.10' [root@blackbear httpd-2.4.10]# make install : Installing configuration files mkdir /usr/local/apache2/conf mkdir /usr/local/apache2/conf/extra mkdir /usr/local/apache2/conf/original mkdir /usr/local/apache2/conf/original/extra Installing HTML documents mkdir /usr/local/apache2/htdocs Installing error documents mkdir /usr/local/apache2/error Installing icons mkdir /usr/local/apache2/icons mkdir /usr/local/apache2/logs Installing CGIs mkdir /usr/local/apache2/cgi-bin Installing header files mkdir /usr/local/apache2/include Installing build system files mkdir /usr/local/apache2/build Installing man pages and online manual mkdir /usr/local/apache2/man mkdir /usr/local/apache2/man/man1 mkdir /usr/local/apache2/man/man8 mkdir /usr/local/apache2/manual make[1]: Leaving directory `/root/lnx/httpd-2.4.10' [root@blackbear httpd-2.4.10]#
(15) [root@blackbear httpd-2.4.10]# /usr/local/apache2/bin/apachectl start AH00557: httpd: apr_sockaddr_info_get() failed for blackbear.kmvs.km.edu.tw 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@blackbear httpd-2.4.10]#
[root@blackbear httpd-2.4.10]# ps ax|grep httpd 20921 ? Ss 0:00 /usr/local/apache2/bin/httpd -k start 20922 ? Sl 0:00 /usr/local/apache2/bin/httpd -k start 20923 ? Sl 0:00 /usr/local/apache2/bin/httpd -k start 20924 ? Sl 0:00 /usr/local/apache2/bin/httpd -k start 21007 pts/0 S+ 0:00 grep --color=auto httpd [root@blackbear httpd-2.4.10]# /usr/local/apache2/bin/apachectl stop AH00557: httpd: apr_sockaddr_info_get() failed for blackbear.kmvs.km.edu.tw 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@blackbear httpd-2.4.10]# ps ax|grep httpd 21012 pts/0 S+ 0:00 grep --color=auto httpd [root@blackbear httpd-2.4.10]#
(16) setup dns's IP entry for blackbear.kmvs.km.edu.tw [root@blackbear httpd-2.4.10]# /usr/local/apache2/bin/apachectl start [root@blackbear httpd-2.4.10]# ps ax|grep httpd 21016 ? Ss 0:00 /usr/local/apache2/bin/httpd -k start 21017 ? Sl 0:00 /usr/local/apache2/bin/httpd -k start 21018 ? Sl 0:00 /usr/local/apache2/bin/httpd -k start 21019 ? Sl 0:00 /usr/local/apache2/bin/httpd -k start 21102 pts/0 S+ 0:00 grep --color=auto httpd [root@blackbear httpd-2.4.10]# [root@blackbear apache2]# /usr/local/apache2/bin/httpd -v Server version: Apache/2.4.10 (Unix) Server built: Jul 31 2014 11:58:50 [root@blackbear apache2]#
|