码迷,mamicode.com
首页 > 其他好文 > 详细

hadoop2.5.1搭建(二)

时间:2014-11-07 12:52:08      阅读:1722      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   http   io   color   ar   os   使用   

第一篇主要是整体的步骤,其实中间遇到很多问题,第二篇将遇到的问题全部列举下来:

1.1包不能加载警告

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

hadoop2.5.1官网上提供的已经是64位操作系统版本,但是仍然报这个错误


1.1.1测试本地库

[root@cluster3 ~]# export HADOOP_ROOT_LOGGER=DEBUG,console
[root@cluster3 script]# hadoop fs -text /usr/local/script/hdfile1.txt
14/11/01 10:58:15 DEBUG util.NativeCodeLoader: Failed to load native-hadoop with error: 
    java.lang.UnsatisfiedLinkError: /usr/local/hadoop/hadoop-2.5.1/lib/native/libhadoop.so.1.0.0: /lib64/libc.so.6:
    version `GLIBC_2.12 not found (required by /usr/local/hadoop/hadoop-2.5.1/lib/native/libhadoop.so.1.0.0)
14/11/01 10:58:15 DEBUG util.NativeCodeLoader: java.library.path=/usr/local/hadoop/hadoop-2.5.1/lib/native
14/11/01 10:58:15 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14/11/01 10:58:15 DEBUG security.JniBasedUnixGroupsMappingWithFallback: Falling back to shell based

[root@cluster1 lib64]# ll /lib64/libc.so.6 
lrwxrwxrwx 1 root root 11 Oct 31 17:27 /lib64/libc.so.6 -> libc-2.5.so

可以看到上边要求的是glibc_2.12,所以需要升级glibc

1.1.2升级glibc

下载glibc
wget  http://ftp.gnu.org/gnu/glibc/glibc-2.12.tar.bz2

下载glibc-linuxthreads
wget http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-2.5.tar.bz2

解压
$tar -jxvf glibc-2.12.tar.bz2
$cd glibc-2.12
$tar -jxvf ../glibc-linuxthreads-2.5.tar.bz2
$cd ..
$export CFLAGS="-g -O2"
./glibc-2.12.2/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

checking for symlinks in /usr/include... ok
running configure fragment for nptl/sysdeps/x86_64
checking for .cfi_personality and .cfi_lsda pseudo-ops... no
configure: error: assembler too old, .cfi_personality support missing

$make
#make install
...................
.....................
                  stubs[$2] = 1; }                 END { for (s in stubs) print "#define __stub_" s } > /usr/local/soft/hesiod/stubsT
mv -f /usr/local/soft/hesiod/stubsT /usr/local/soft/hesiod/stubs
make[2]: Leaving directory `/usr/local/soft/glibc-2.14/hesiodmake  subdir=sunrpc -C sunrpc ..=../ subdir_install
make[2]: Entering directory `/usr/local/soft/glibc-2.14/sunrpc/usr/bin/install -c -m 644 rpc/netdb.h /usr/include/rpc/netdb.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/bootparam_prot.h /usr/include/rpcsvc/bootparam_prot.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/nlm_prot.h /usr/include/rpcsvc/nlm_prot.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/rstat.h /usr/include/rpcsvc/rstat.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/yppasswd.h /usr/include/rpcsvc/yppasswd.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/klm_prot.h /usr/include/rpcsvc/klm_prot.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/rex.h /usr/include/rpcsvc/rex.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/sm_inter.h /usr/include/rpcsvc/sm_inter.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/mount.h /usr/include/rpcsvc/mount.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/rusers.h /usr/include/rpcsvc/rusers.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/spray.h /usr/include/rpcsvc/spray.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/nfs_prot.h /usr/include/rpcsvc/nfs_prot.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/rquota.h /usr/include/rpcsvc/rquota.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/rpcsvc/key_prot.h /usr/include/rpcsvc/key_prot.h
/usr/bin/install -c -m 644 ../sysdeps/unix/sysv/linux/nfs/nfs.h /usr/include/nfs/nfs.h
/usr/bin/install -c -m 644 /usr/local/soft/sunrpc/librpcsvc.a /usr/lib64/librpcsvc.a
/usr/bin/install -c -m 644 etc.rpc /etc/rpc
/usr/bin/install -c /usr/local/soft/sunrpc/rpcgen /usr/bin/rpcgen.new
mv -f /usr/bin/rpcgen.new /usr/bin/rpcgen
(cd /usr/local/soft/sunrpc/.; /usr/bin/objdump -h auth_none.os authuxprot.os bindrsvprt.os clnt_raw.os clnt_simp.os rpc_dtable.os getrpcport.os pmap_clnt.os pm_getmaps.os pmap_prot.os pmap_prot2.os pmap_rmt.os rpc_prot.os rpc_common.os rpc_cmsg.os svc_auth.os svc_authux.os svc_raw.os svc_simple.os xdr_float.os xdr_rec.os publickey.os authdes_prot.os des_crypt.os des_impl.os des_soft.os key_prot.os openchild.os rtime.os svcauth_des.os clnt_unix.os svc_unix.os create_xid.os auth_des.os auth_unix.os clnt_gen.os clnt_perr.os clnt_tcp.os clnt_udp.os get_myaddr.os key_call.os netname.os pm_getport.os rpc_thread.os svc.os svc_tcp.os svc_udp.os xcrypt.os xdr_array.os xdr.os xdr_intXX_t.os xdr_mem.os xdr_ref.os xdr_sizeof.os xdr_stdio.os svc_run.os rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o rpc_scan.o rpc_util.o rpc_svcout.o rpc_clntout.o rpc_tblout.o rpc_sample.o xbootparam_prot.o xnlm_prot.o xrstat.o xyppasswd.o xklm_prot.o xrex.o xsm_inter.o xmount.o xrusers.o xspray.o xnfs_prot.o xrquota.o xkey_prot.o) |         gawk /\.gnu\.glibc-stub\./ { \
                  sub(/\.gnu\.glibc-stub\./, "", $2);                   stubs[$2] = 1; }                 END { for (s in stubs) print "#define __stub_" s } > /usr/local/soft/sunrpc/stubsT
mv -f /usr/local/soft/sunrpc/stubsT /usr/local/soft/sunrpc/stubs
make[2]: Leaving directory `/usr/local/soft/glibc-2.14/sunrpcmake  subdir=nis -C nis ..=../ subdir_install
make[2]: Entering directory `/usr/local/soft/glibc-2.14/nis/usr/bin/install -c /usr/local/soft/nis/libnsl.so /lib64/libnsl-2.14.so.new
mv -f /lib64/libnsl-2.14.so.new /lib64/libnsl-2.14.so
echo libnsl-2.14.so /lib64/libnsl.so.1 >> /usr/local/soft/elf/symlink.list
rm -f /usr/lib64/libnsl.so.new
/bin/sh ../scripts/rellns-sh /lib64/libnsl.so.1 /usr/lib64/libnsl.so.new
mv -f /usr/lib64/libnsl.so.new /usr/lib64/libnsl.so
/usr/bin/install -c /usr/local/soft/nis/libnss_nis.so /lib64/libnss_nis-2.14.so.new
mv -f /lib64/libnss_nis-2.14.so.new /lib64/libnss_nis-2.14.so
echo libnss_nis-2.14.so /lib64/libnss_nis.so.2 >> /usr/local/soft/elf/symlink.list
rm -f /usr/lib64/libnss_nis.so.new
/bin/sh ../scripts/rellns-sh /lib64/libnss_nis.so.2 /usr/lib64/libnss_nis.so.new
mv -f /usr/lib64/libnss_nis.so.new /usr/lib64/libnss_nis.so
/usr/bin/install -c /usr/local/soft/nis/libnss_nisplus.so /lib64/libnss_nisplus-2.14.so.new
mv -f /lib64/libnss_nisplus-2.14.so.new /lib64/libnss_nisplus-2.14.so
echo libnss_nisplus-2.14.so /lib64/libnss_nisplus.so.2 >> /usr/local/soft/elf/symlink.list
rm -f /usr/lib64/libnss_nisplus.so.new
/bin/sh ../scripts/rellns-sh /lib64/libnss_nisplus.so.2 /usr/lib64/libnss_nisplus.so.new
mv -f /usr/lib64/libnss_nisplus.so.new /usr/lib64/libnss_nisplus.so
/usr/bin/install -c /usr/local/soft/nis/libnss_compat.so /lib64/libnss_compat-2.14.so.new
mv -f /lib64/libnss_compat-2.14.so.new /lib64/libnss_compat-2.14.so
echo libnss_compat-2.14.so /lib64/libnss_compat.so.2 >> /usr/local/soft/elf/symlink.list
rm -f /usr/lib64/libnss_compat.so.new
/bin/sh ../scripts/rellns-sh /lib64/libnss_compat.so.2 /usr/lib64/libnss_compat.so.new
mv -f /usr/lib64/libnss_compat.so.new /usr/lib64/libnss_compat.so
/usr/bin/install -c -m 644 /usr/local/soft/nis/libnsl.a /usr/lib64/libnsl.a
(cd /usr/local/soft/nis/.; /usr/bin/objdump -h nis_hash.o nis_hash.os yp_xdr.o ypclnt.o ypupdate_xdr.o nis_subr.o nis_local_names.o nis_free.o nis_file.o nis_print.o nis_error.o nis_call.o nis_lookup.o nis_table.o nis_xdr.o nis_server.o nis_ping.o nis_checkpoint.o nis_mkdir.o nis_rmdir.o nis_getservlist.o nis_verifygroup.o nis_ismember.o nis_addmember.o nis_util.o nis_removemember.o nis_creategroup.o nis_destroygroup.o nis_print_group_entry.o nis_domain_of.o nis_domain_of_r.o nis_modify.o nis_remove.o nis_add.o nis_defaults.o nis_findserv.o nis_callback.o nis_clone_dir.o nis_clone_obj.o nis_clone_res.o nss-default.o yp_xdr.os ypclnt.os ypupdate_xdr.os nis_subr.os nis_local_names.os nis_free.os nis_file.os nis_print.os nis_error.os nis_call.os nis_lookup.os nis_table.os nis_xdr.os nis_server.os nis_ping.os nis_checkpoint.os nis_mkdir.os nis_rmdir.os nis_getservlist.os nis_verifygroup.os nis_ismember.os nis_addmember.os nis_util.os nis_removemember.os nis_creategroup.os nis_destroygroup.os nis_print_group_entry.os nis_domain_of.os nis_domain_of_r.os nis_modify.os nis_remove.os nis_add.os nis_defaults.os nis_findserv.os nis_callback.os nis_clone_dir.os nis_clone_obj.os nis_clone_res.os nss-default.os nis-proto.os nis-service.os nis-hosts.os nis-network.os nis-grp.os nis-pwd.os nis-rpc.os nis-ethers.os nis-spwd.os nis-netgrp.os nis-alias.os nis-publickey.os nis-initgroups.os nss-nis.os nisplus-proto.os nisplus-service.os nisplus-hosts.os nisplus-network.os nisplus-grp.os nisplus-pwd.os nisplus-rpc.os nisplus-ethers.os nisplus-spwd.os nisplus-netgrp.os nisplus-alias.os nisplus-publickey.os nisplus-parser.os nss-nisplus.os nisplus-initgroups.os compat-grp.os compat-pwd.os compat-spwd.os compat-initgroups.os) |         gawk /\.gnu\.glibc-stub\./ { \
                  sub(/\.gnu\.glibc-stub\./, "", $2);                   stubs[$2] = 1; }                 END { for (s in stubs) print "#define __stub_" s } > /usr/local/soft/nis/stubsT
mv -f /usr/local/soft/nis/stubsT /usr/local/soft/nis/stubs
make[2]: Leaving directory `/usr/local/soft/glibc-2.14/nismake  subdir=nscd -C nscd ..=../ subdir_install
make[2]: Entering directory `/usr/local/soft/glibc-2.14/nscd/usr/bin/install -c /usr/local/soft/nscd/nscd /usr/sbin/nscd.new
mv -f /usr/sbin/nscd.new /usr/sbin/nscd
(cd /usr/local/soft/nscd/.; /usr/bin/objdump -h nscd_getpw_r.o nscd_getgr_r.o nscd_gethst_r.o nscd_getai.o nscd_initgroups.o nscd_getserv_r.o nscd_helper.o nscd_getpw_r.os nscd_getgr_r.os nscd_gethst_r.os nscd_getai.os nscd_initgroups.os nscd_getserv_r.os nscd_helper.os nscd.o connections.o pwdcache.o getpwnam_r.o getpwuid_r.o grpcache.o getgrnam_r.o getgrgid_r.o hstcache.o gethstbyad_r.o gethstbynm3_r.o getsrvbynm_r.o getsrvbypt_r.o servicescache.o dbg_log.o nscd_conf.o nscd_stat.o cache.o mem.o nscd_setup_thread.o xmalloc.o xstrdup.o aicache.o initgrcache.o gai.o res_hconf.o) |         gawk /\.gnu\.glibc-stub\./ { \
                  sub(/\.gnu\.glibc-stub\./, "", $2);                   stubs[$2] = 1; }                 END { for (s in stubs) print "#define __stub_" s } > /usr/local/soft/nscd/stubsT
mv -f /usr/local/soft/nscd/stubsT /usr/local/soft/nscd/stubs
make[2]: Leaving directory `/usr/local/soft/glibc-2.14/nscdmake  subdir=streams -C streams ..=../ subdir_install
make[2]: Entering directory `/usr/local/soft/glibc-2.14/streams/usr/bin/install -c -m 644 stropts.h /usr/include/stropts.h
/usr/bin/install -c -m 644 sys/stropts.h /usr/include/sys/stropts.h
/usr/bin/install -c -m 644 ../bits/stropts.h /usr/include/bits/stropts.h
/usr/bin/install -c -m 644 ../sysdeps/x86_64/bits/xtitypes.h /usr/include/bits/xtitypes.h
(cd /usr/local/soft/streams/.; /usr/bin/objdump -h isastream.o getmsg.o getpmsg.o putmsg.o putpmsg.o fattach.o fdetach.o isastream.os getmsg.os getpmsg.os putmsg.os putpmsg.os fattach.os fdetach.os) |         gawk /\.gnu\.glibc-stub\./ { \
                  sub(/\.gnu\.glibc-stub\./, "", $2);                   stubs[$2] = 1; }                 END { for (s in stubs) print "#define __stub_" s } > /usr/local/soft/streams/stubsT
mv -f /usr/local/soft/streams/stubsT /usr/local/soft/streams/stubs
make[2]: Leaving directory `/usr/local/soft/glibc-2.14/streamsmake  subdir=login -C login ..=../ subdir_install
make[2]: Entering directory `/usr/local/soft/glibc-2.14/login/usr/bin/install -c -m 644 utmp.h /usr/include/utmp.h
/usr/bin/install -c -m 644 ../sysdeps/gnu/bits/utmp.h /usr/include/bits/utmp.h
/usr/bin/install -c -m 644 lastlog.h /usr/include/lastlog.h
/usr/bin/install -c -m 644 pty.h /usr/include/pty.h
/usr/bin/install -c -m 644 ../sysdeps/gnu/utmpx.h /usr/include/utmpx.h
/usr/bin/install -c -m 644 ../sysdeps/gnu/bits/utmpx.h /usr/include/bits/utmpx.h
/usr/bin/install -c /usr/local/soft/login/libutil.so /lib64/libutil-2.14.so.new
mv -f /lib64/libutil-2.14.so.new /lib64/libutil-2.14.so
echo libutil-2.14.so /lib64/libutil.so.1 >> /usr/local/soft/elf/symlink.list
rm -f /usr/lib64/libutil.so.new
/bin/sh ../scripts/rellns-sh /lib64/libutil.so.1 /usr/lib64/libutil.so.new
mv -f /usr/lib64/libutil.so.new /usr/lib64/libutil.so
/usr/bin/install -c -m 644 /usr/local/soft/login/libutil.a /usr/lib64/libutil.a
/usr/bin/install -c -m 4755 -o root /usr/local/soft/login/pt_chown /usr/libexec/pt_chown
(cd /usr/local/soft/login/.; /usr/bin/objdump -h getutent.o getutent_r.o getutid.o getutline.o getutid_r.o getutline_r.o utmp_file.o utmpname.o updwtmp.o getpt.o grantpt.o unlockpt.o ptsname.o setutxent.o getutxent.o endutxent.o getutxid.o getutxline.o pututxline.o utmpxname.o updwtmpx.o getutmpx.o getutmp.o getutent.os getutent_r.os getutid.os getutline.os getutid_r.os getutline_r.os utmp_file.os utmpname.os updwtmp.os getpt.os grantpt.os unlockpt.os ptsname.os setutxent.os getutxent.os endutxent.os getutxid.os getutxline.os pututxline.os utmpxname.os updwtmpx.os getutmpx.os getutmp.os login.o login_tty.o logout.o logwtmp.o openpty.o forkpty.o login.os login_tty.os logout.os logwtmp.os openpty.os forkpty.os) |         gawk /\.gnu\.glibc-stub\./ { \
                  sub(/\.gnu\.glibc-stub\./, "", $2);                   stubs[$2] = 1; }                 END { for (s in stubs) print "#define __stub_" s } > /usr/local/soft/login/stubsT
mv -f /usr/local/soft/login/stubsT /usr/local/soft/login/stubs
make[2]: Leaving directory `/usr/local/soft/glibc-2.14/loginmake  subdir=elf -C elf ..=../ subdir_install
make[2]: Entering directory `/usr/local/soft/glibc-2.14/elf/usr/bin/install -c -m 644 elf.h /usr/include/elf.h
/usr/bin/install -c -m 644 ../bits/elfclass.h /usr/include/bits/elfclass.h
/usr/bin/install -c -m 644 link.h /usr/include/link.h
/usr/bin/install -c -m 644 ../sysdeps/x86_64/bits/link.h /usr/include/bits/link.h
make -f /usr/local/soft/elf/librtld.mk -f rtld-Rules
make[3]: Entering directory `/usr/local/soft/glibc-2.14/elfmake subdir=csu -C ../csu ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-check_fds.os rtld-errno.os rtld-init-arch.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/csumake[4]: Nothing to be done for `rtld-all.
make[4]: Leaving directory `/usr/local/soft/glibc-2.14/csumake subdir=dirent -C ../dirent ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-closedir.os rtld-readdir.os rtld-rewinddir.os rtld-getdents.os rtld-fdopendir.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/direntmake[4]: Nothing to be done for `rtld-all.
make[4]: Leaving directory `/usr/local/soft/glibc-2.14/direntmake subdir=gmon -C ../gmon ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-profil.os rtld-prof-freq.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/gmonmake[4]: Leaving directory `/usr/local/soft/glibc-2.14/gmonmake subdir=io -C ../io ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-xstat.os rtld-fxstat.os rtld-lxstat.os rtld-open.os rtld-close.os rtld-read.os rtld-write.os rtld-access.os rtld-fcntl.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/iomake[4]: Nothing to be done for `rtld-all.
make[4]: Leaving directory `/usr/local/soft/glibc-2.14/iomake subdir=misc -C ../misc ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-getpagesize.os rtld-mmap.os rtld-munmap.os rtld-mprotect.os rtld-llseek.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/miscmake[4]: Leaving directory `/usr/local/soft/glibc-2.14/miscmake subdir=nptl -C ../nptl ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-libc-lowlevellock.os rtld-libc-cancellation.os rtld-libc_multiple_threads.os rtld-forward.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/nptlmake[4]: Nothing to be done for `rtld-all.
make[4]: Leaving directory `/usr/local/soft/glibc-2.14/nptlmake subdir=posix -C ../posix ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-uname.os rtld-_exit.os rtld-getpid.os rtld-getuid.os rtld-geteuid.os rtld-getgid.os rtld-getegid.os rtld-environ.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/posixmake[4]: Nothing to be done for `rtld-all.
make[4]: Leaving directory `/usr/local/soft/glibc-2.14/posixmake subdir=setjmp -C ../setjmp ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-setjmp.os rtld-__longjmp.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/setjmpmake[4]: Nothing to be done for `rtld-all.
make[4]: Leaving directory `/usr/local/soft/glibc-2.14/setjmpmake subdir=signal -C ../signal ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-sigaction.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/signalmake[4]: Nothing to be done for `rtld-all.
make[4]: Leaving directory `/usr/local/soft/glibc-2.14/signalmake subdir=stdlib -C ../stdlib ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-bsearch.os rtld-exit.os rtld-cxa_atexit.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/stdlibmake[4]: Nothing to be done for `rtld-all.
make[4]: Leaving directory `/usr/local/soft/glibc-2.14/stdlibmake subdir=string -C ../string ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-strchr.os rtld-strcmp.os rtld-strcpy.os rtld-strlen.os rtld-strnlen.os rtld-memchr.os rtld-memcmp.os rtld-memmove.os rtld-memset.os rtld-mempcpy.os rtld-stpcpy.os rtld-memcpy.os rtld-wordcopy.os rtld-rawmemchr.os rtld-strcmp-ssse3.os rtld-strend-sse4.os rtld-memcmp-sse4.os rtld-memcpy-ssse3.os rtld-mempcpy-ssse3.os rtld-memmove-ssse3.os rtld-memcpy-ssse3-back.os rtld-mempcpy-ssse3-back.os rtld-memmove-ssse3-back.os rtld-strlen-sse4.os rtld-strlen-no-bsf.os rtld-memset-x86-64.os rtld-cacheinfo.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/stringmake[4]: Nothing to be done for `rtld-all.
make[4]: Leaving directory `/usr/local/soft/glibc-2.14/stringmake subdir=time -C ../time ..=../ objdir=/usr/local/soft -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=rtld-setitimer.os
make[4]: Entering directory `/usr/local/soft/glibc-2.14/timemake[4]: Nothing to be done for `rtld-all.
make[4]: Leaving directory `/usr/local/soft/glibc-2.14/timemake[3]: Leaving directory `/usr/local/soft/glibc-2.14/elf/usr/bin/install -c /usr/local/soft/elf/ld.so /lib64/ld-2.14.so.new
mv -f /lib64/ld-2.14.so.new /lib64/ld-2.14.so
/usr/bin/install -c /usr/local/soft/libc.so /lib64/libc-2.14.so.new
mv -f /lib64/libc-2.14.so.new /lib64/libc-2.14.so
echo ld-2.14.so /lib64/ld-linux-x86-64.so.2 >> /usr/local/soft/elf/symlink.list
/usr/bin/install -c /usr/local/soft/elf/sotruss-lib.so /usr/lib64/audit/sotruss-lib.so.new
mv -f /usr/lib64/audit/sotruss-lib.so.new /usr/lib64/audit/sotruss-lib.so
/usr/bin/install -c /usr/local/soft/elf/sprof /usr/bin/sprof.new
mv -f /usr/bin/sprof.new /usr/bin/sprof
/usr/bin/install -c /usr/local/soft/elf/ldd /usr/bin/ldd.new
mv -f /usr/bin/ldd.new /usr/bin/ldd
/usr/bin/install -c /usr/local/soft/elf/sotruss /usr/bin/sotruss.new
mv -f /usr/bin/sotruss.new /usr/bin/sotruss
/usr/bin/install -c /usr/local/soft/elf/sln /sbin/sln.new
mv -f /sbin/sln.new /sbin/sln
/usr/bin/install -c /usr/local/soft/elf/ldconfig /sbin/ldconfig.new
mv -f /sbin/ldconfig.new /sbin/ldconfig
(cd /usr/local/soft/elf/.; /usr/bin/objdump -h dl-load.o dl-cache.o dl-lookup.o dl-object.o dl-reloc.o dl-deps.o dl-runtime.o dl-error.o dl-init.o dl-fini.o dl-debug.o dl-misc.o dl-version.o dl-profile.o dl-conflict.o dl-tls.o dl-origin.o dl-scope.o dl-execstack.o dl-open.o dl-close.o dl-trampoline.o dl-support.o dl-iteratephdr.o dl-addr.o enbl-secure.o dl-profstub.o dl-libc.o dl-sym.o dl-tsd.o dl-sysdep.o dl-vdso.o tlsdesc.o dl-tlsdesc.o dl-iteratephdr.os dl-addr.os dl-profstub.os dl-libc.os dl-sym.os dl-tsd.os dl-vdso.os rtld.os dl-load.os dl-cache.os dl-lookup.os dl-object.os dl-reloc.os dl-deps.os dl-runtime.os dl-error.os dl-init.os dl-fini.os dl-debug.os dl-misc.os dl-version.os dl-profile.os dl-conflict.os dl-tls.os dl-origin.os dl-scope.os dl-execstack.os dl-caller.os dl-open.os dl-close.os dl-trampoline.os dl-sysdep.os dl-environ.os dl-minimal.os dl-brk.os dl-sbrk.os dl-getcwd.os dl-openat64.os dl-opendir.os dl-fxstatat64.os tlsdesc.os dl-tlsdesc.os soinit.os sofini.os interp.os cache.o readlib.o xmalloc.o xstrdup.o chroot_canon.o sotruss-lib.os sotruss-lib.so) |         gawk /\.gnu\.glibc-stub\./ { \
                  sub(/\.gnu\.glibc-stub\./, "", $2);                   stubs[$2] = 1; }                 END { for (s in stubs) print "#define __stub_" s } > /usr/local/soft/elf/stubsT
mv -f /usr/local/soft/elf/stubsT /usr/local/soft/elf/stubs
make[2]: Leaving directory `/usr/local/soft/glibc-2.14/elf(sed /^@/d include/stubs-prologue.h; LC_ALL=C sort /usr/local/soft/csu/stubs /usr/local/soft/iconv/stubs /usr/local/soft/locale/stubs /usr/local/soft/localedata/stubs /usr/local/soft/iconvdata/stubs /usr/local/soft/assert/stubs /usr/local/soft/ctype/stubs /usr/local/soft/intl/stubs /usr/local/soft/catgets/stubs /usr/local/soft/math/stubs /usr/local/soft/setjmp/stubs /usr/local/soft/signal/stubs /usr/local/soft/stdlib/stubs /usr/local/soft/stdio-common/stubs /usr/local/soft/libio/stubs /usr/local/soft/dlfcn/stubs /usr/local/soft/malloc/stubs /usr/local/soft/string/stubs /usr/local/soft/wcsmbs/stubs /usr/local/soft/timezone/stubs /usr/local/soft/time/stubs /usr/local/soft/dirent/stubs /usr/local/soft/grp/stubs /usr/local/soft/pwd/stubs /usr/local/soft/posix/stubs /usr/local/soft/io/stubs /usr/local/soft/termios/stubs /usr/local/soft/resource/stubs /usr/local/soft/misc/stubs /usr/local/soft/socket/stubs /usr/local/soft/sysvipc/stubs /usr/local/soft/gmon/stubs /usr/local/soft/gnulib/stubs /usr/local/soft/wctype/stubs /usr/local/soft/manual/stubs /usr/local/soft/shadow/stubs /usr/local/soft/gshadow/stubs /usr/local/soft/po/stubs /usr/local/soft/argp/stubs /usr/local/soft/crypt/stubs /usr/local/soft/nptl/stubs /usr/local/soft/resolv/stubs /usr/local/soft/nss/stubs /usr/local/soft/rt/stubs /usr/local/soft/conform/stubs /usr/local/soft/debug/stubs /usr/local/soft/libidn/stubs /usr/local/soft/nptl_db/stubs /usr/local/soft/inet/stubs /usr/local/soft/hesiod/stubs /usr/local/soft/sunrpc/stubs /usr/local/soft/nis/stubs /usr/local/soft/nscd/stubs /usr/local/soft/streams/stubs /usr/local/soft/login/stubs /usr/local/soft/elf/stubs) > /usr/local/soft/stubs.h
if test -r /usr/include/gnu/stubs-64.h && cmp -s /usr/local/soft/stubs.h /usr/include/gnu/stubs-64.h;         then echo stubs.h unchanged;         else /usr/bin/install -c -m 644 /usr/local/soft/stubs.h /usr/include/gnu/stubs-64.h; fi
rm -f /usr/local/soft/stubs.h
/usr/local/soft/elf/sln /usr/local/soft/elf/symlink.list
rm -f /usr/local/soft/elf/symlink.list
test ! -x /usr/local/soft/elf/ldconfig || LC_ALL=C LANGUAGE=C           /usr/local/soft/elf/ldconfig                                         /lib64 /usr/lib64
CC="gcc -B/usr/bin/" /usr/bin/perl scripts/test-installation.pl /usr/local/soft/
/usr/bin/ld: cannot find -lnss_test1
collect2: ld returned 1 exit status
Execution of gcc -B/usr/bin/ failed!
The script has found some problems with your installation!
Please read the FAQ and the README file and check the following:
- Did you change the gcc specs file (necessary after upgrading from
  Linux libc5)?
- Are there any symbolic links of the form libXXX.so to old libraries?
  Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,
  libm.so should point to the newly installed glibc file - and there should be
  only one such link (check e.g. /lib and /usr/lib)
You should restart this script from your build directory after youve
fixed all problems!
Btw. the script doesnt work if youre installing GNU libc not as your
primary library!
make[1]: *** [install] Error 1
make[1]: Leaving directory `/usr/local/soft/glibc-2.14make: *** [install] Error 2
[root@cluster3 soft]# ls -l /lib/libc.so.6 
lrwxrwxrwx. 1 root root 12 Nov  4 15:16 /lib/libc.so.6 -> libc-2.12.so

安装完后,可以查看ls -l /lib/libc.so.6已升级

2、配置本地yum源

修改yum的配置文件,使用本地ISO做yum源

# cd /etc/yum.repos.d/

# mv CentOS-Base.repo CentOS-Base.repo.bak     禁用默认的yum 网络源

# cp CentOS-Media.repo CentOS-Media.repo.bak     是yum 本地源的配置文件        

修改配置文件
# vi  CentOS-Media.repo
baseurl=file:///media/CentOS_6.3_Final/
enabled=1                   #启用yum

[root@cluster3 yum.repos.d]# yum -y install gcc

3、clone虚拟机后,修改主机名

修改主机名
修改/etc/sysconfig/network中的hostname为【修改后的主机名】
修改/etc/hosts文件中的 【原来主机名】为【修改后的主机名】
reboot,重启系统。
查看hostname ,是否修改成功

4测试程序

[root@cluster3 input]# hadoop dfs -mkdir /hadoop
[root@cluster3 input]# hadoop dfs -mkdir /hadoop/input

[root@cluster3 hadoop-2.5.1]# hadoop dfs -put /usr/local/hadoop/hadoop-2.5.1/test/text1.txt /hadoop/input
[root@cluster3 hadoop-2.5.1]# hadoop dfs -put /usr/local/hadoop/hadoop-2.5.1/test/text2.txt /hadoop/input
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

[root@cluster3 hadoop-2.5.1]# hadoop jar /usr/local/hadoop/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.1.jar wordcount /hadoop/input/* /hadoop/output
14/11/06 15:44:51 INFO client.RMProxy: Connecting to ResourceManager at cluster3/192.168.220.63:8032
14/11/06 15:44:52 INFO input.FileInputFormat: Total input paths to process : 2
14/11/06 15:44:52 INFO mapreduce.JobSubmitter: number of splits:2
14/11/06 15:44:52 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1415259711375_0001
14/11/06 15:44:53 INFO impl.YarnClientImpl: Submitted application application_1415259711375_0001
14/11/06 15:44:53 INFO mapreduce.Job: The url to track the job: http://cluster3:8088/proxy/application_1415259711375_0001/
14/11/06 15:44:53 INFO mapreduce.Job: Running job: job_1415259711375_0001
14/11/06 15:45:04 INFO mapreduce.Job: Job job_1415259711375_0001 running in uber mode : false
14/11/06 15:45:04 INFO mapreduce.Job:  map 0% reduce 0%
14/11/06 15:45:57 INFO mapreduce.Job:  map 100% reduce 0%
14/11/06 15:46:17 INFO mapreduce.Job:  map 100% reduce 100%
14/11/06 15:46:18 INFO mapreduce.Job: Job job_1415259711375_0001 completed successfully
14/11/06 15:46:18 INFO mapreduce.Job: Counters: 49
        File System Counters
                FILE: Number of bytes read=55
                FILE: Number of bytes written=291499
                FILE: Number of read operations=0
                FILE: Number of large read operations=0
                FILE: Number of write operations=0
                HDFS: Number of bytes read=241
                HDFS: Number of bytes written=25
                HDFS: Number of read operations=9
                HDFS: Number of large read operations=0
                HDFS: Number of write operations=2
        Job Counters 
                Launched map tasks=2
                Launched reduce tasks=1
                Data-local map tasks=2
                Total time spent by all maps in occupied slots (ms)=106968
                Total time spent by all reduces in occupied slots (ms)=9679
                Total time spent by all map tasks (ms)=106968
                Total time spent by all reduce tasks (ms)=9679
                Total vcore-seconds taken by all map tasks=106968
                Total vcore-seconds taken by all reduce tasks=9679
                Total megabyte-seconds taken by all map tasks=109535232
                Total megabyte-seconds taken by all reduce tasks=9911296
        Map-Reduce Framework
                Map input records=2
                Map output records=4
                Map output bytes=41
                Map output materialized bytes=61
                Input split bytes=216
                Combine input records=4
                Combine output records=4
                Reduce input groups=3
                Reduce shuffle bytes=61
                Reduce input records=4
                Reduce output records=3
                Spilled Records=8
                Shuffled Maps =2
                Failed Shuffles=0
                Merged Map outputs=2
                GC time elapsed (ms)=1085
                CPU time spent (ms)=3400
                Physical memory (bytes) snapshot=502984704
                Virtual memory (bytes) snapshot=2204106752
                Total committed heap usage (bytes)=257171456
        Shuffle Errors
                BAD_ID=0
                CONNECTION=0
                IO_ERROR=0
                WRONG_LENGTH=0
                WRONG_MAP=0
                WRONG_REDUCE=0
        File Input Format Counters 
                Bytes Read=25
        File Output Format Counters 
                Bytes Written=25
                
[root@cluster3 hadoop-2.5.1]# hadoop dfs -ls /hadoop/
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

Found 2 items
drwxr-xr-x   - root supergroup          0 2014-11-06 15:44 /hadoop/input
drwxr-xr-x   - root supergroup          0 2014-11-06 15:46 /hadoop/output

[root@cluster3 hadoop-2.5.1]# hadoop dfs -cat /hadoop/output/part-r-00000
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

hadoop  1
hello   2
world   1

5.连接失败

[root@cluster3 hadoop-2.5.1]# hadoop jar /usr/local/hadoop/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.1.jar wordcount /hadoop/input/* /hadoop/output
14/11/06 11:28:15 INFO client.RMProxy: Connecting to ResourceManager at cluster3/192.168.220.63:8032
java.net.ConnectException: Call From cluster3/192.168.220.63 to cluster3:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
解决办法:
namenode未启动

6.没有datanode

14/11/06 09:39:10 WARN hdfs.DFSClient: DataStreamer Exception
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /hadoop/input/text1.txt._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1).  There are 0 datanode(s) running and no node(s) are excluded in this operation.
        at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget(BlockManager.java:1471)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:2791)
解决办法:
由于执行了多次hdfs namenode -format 需要手动清除下name和data数据

7.数据丢失危险

2014-11-06 10:20:14,903 WARN org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Only one image storage directory (dfs.namenode.name.dir) configured. Beware of data loss due to lack of redundant storage directories!
2014-11-06 10:20:14,903 WARN org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Only one namespace edits storage directory (dfs.namenode.edits.dir) configured. Beware of data loss due to lack of redundant storage directories!
通过在dfs.namenode.name.dir和dfs.datanode.data.dir设置多个挂载在不同物理硬盘或者NFS挂载的目录即可    
        

8.http://192.168.220.63:50070访问不了,NodeManager启动一下,过一会就没了。

关闭防火墙服务
[root@cluster3 hadoop]# service iptables stop
关闭开机自动启动
[root@cluster3 hadoop]# chkconfig iptables off

 

hadoop2.5.1搭建(二)

标签:des   style   blog   http   io   color   ar   os   使用   

原文地址:http://www.cnblogs.com/huanhuanang/p/4080799.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!