1. Virtual machine Installation system version RHEL6.3
2. Virtual Machine IP ConfigurationAdopt shared Mode (NAT):Default: Use Vmnet8 to set the virtual machine to use DHCP to surf the Internet, under Windows Select "Get IP automatically", Linux open DHCP service.
Manual settings: IP Settings and vmnet8 with the same network segment,
gateways are set up as Vmnet8 gateways,
The DNS server settings are the same as the host,
Implement virtual Machines <---> Host virtual machines <----> Internet communications.
Vim/etc/sysconfig/network-scripts/ifcfg-eth0 ...... bootproto=static onboot= "Yes" ipaddr=192.168.234.100--Set as Gateway and IP segment netmask=255.255.255.0 gateway=192.168.234.2-- Gateway for Vmnet8 ...... Finally, don't forget to set up DNS echo "nameserver 8.8.8.8" >>/etc/resolv.confRestart reboot
Set up can be viewed with SECURECRT, and be able to ping the external network
Yum Source Configuration View documentation upgrade or software installation using CentOS's Yum source
Rpm-qa |grep Yum view Yum installation statusRpm-qa |grep Yum | xargs rpm-e--nodeps Uninstall Rhel original Yum
Installing the Yum package 1. #rpm-IVH python-iniparse-0.3.1-2.1.el6.noarch.rpm 2. # RPM-IVH yum-metadata-parser-1.1.2-16.el6.x86_64.rpm 3. #rpm-IVH yum-3.2.29-30.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.3 0-14.el6.noarch.rpm
as the CentOS official website version 6.3 is no longer updated and the file does not exist, so the choice is CentOS website 6.5 versions of Yum related packages Download the 163 warehouse at the same time,Http://mirrors.163.com/.help/CentOS6-Base-163.repo Modify $releaseser to 6.5Delete/etc/yum.repos.d/rhel-source.repoReplace with Centos-163.repo
SCP Centos-163.repo [email protected] :/etc/yum.repos.d/
install Rz+sz easy to upload and download files to localYum-y Install Lrzsz
Transfer all dependent files to other serversscp-r DEP [email protected] :/home/hadoop/
Install Java, and configure environment variablesjava-version Viewing existing Java versions
Rpm-qa|grep Java View Java installation packagerpm-qa|grep Java | Xargs rpm-e--nodeps Uninstalling the Java installation package
Vim/etc/profile Add Java environment variable configuration #set java path java_home=/usr/java/jdk1.7.0_45 jre_home=/usr/java/jdk1.7.0_45/jre PATH=$ PATH: $JAVA _home/bin: $JRE _home/bin classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib
Source/etc/profile application Configuration Other machines use the same configuration Scp/etc/profile[email protected]:/etc/profile
Configuring host 192.168.234.114 Namenode192.168.234.111Datanode1192.168.234.112Datanode2192.168.234.113Datanode3 other Namenode and Datanode configurations scp/etc/hosts[email protected]:/etc/hosts
Configuring SSH http://www.cnblogs.com/xia520pi/archive/2012/05/16/2503949.html
Ssh-keygen-t Dsa-p "-F ~/.SSH/ID_DSA cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
SCP to Datanode
Installing Hadoop TAR-XVF dep/hadoop/hadoop-2.5.1.tar.gz
Configure Hadoop http://blog.csdn.net/greensurfer/article/details/39450369
Slaves file in/home/hadoop/hadoop-2.5.1/etc/hadoop Add Data node Datanode1 datanode2 datanode3
Configure hostnameFormat Namenode error handling method http://blog.csdn.net/shirdrn/article/details/6562292
/etc/sysconfig/network in hostname Modify and restart the Network service to take effect Service Network Restart three ways to modify hostname:Http://www.cnblogs.com/yuechaotian/archive/2013/02/20/2918175.html
Format File systemBin/hdfs Namenode-format
http://192.168.234.114:50070/Be sure to remember to shut down the Namenode firewall, otherwise you won't be able to access Service iptables Stop/status
http://192.168.234.114:8088/
But start./start-dfs.sh always have a warning WARN util. nativecodeloader:unable to load Native-hadoop library for your platform ... using Builtin-java classes where applicable St Arting namenodes on [Namenode]
Hadoop fs-mkdir/input Command Error
turn on debug modeExport Hadoop_root_logger=debug,console
You can see the reason why the glibc version is too low
Http://f.dataguru.cn/thread-376971-1-1.html There are two ways to resolve 1. Recompile Hadoop 2 in a glibc2.12 environment. Install glibc2.14 or later
Here I take the second kindupgrade glibc to more than 2.14, Pre-upgrade never Do not uninstall glibc , all commands are invalidated after uninstallation, Restart also reported error kernel Panic-not attempted to kill Init, I can only re-install the system, and a half-day after reloading the Namenode, biography from Datanode Hadoop past Restart after formatting the file system, otherwise the data node will not be found
1. Download glibc-2.15-60.el6.x86_64.rpm glibc-common-2.15-60.el6.x86_64.rpm installation rpm-ivh glibc-2.15-60.el6.x86_64.rpm glibc-common-2.15-60.el6.x86_64.rpm--replacefiles do not add --replacefiles will report a conflicting error in the file.
Rerun ./start-dfs.sh, stop calling the cops.
Hadoop fs-mkdir/input Create folder Hadoop fs-ls/presentation file list
Hadoop error: Noroutetohostexception:no route to host http://blog.csdn.net/duguduchong/article/details/8471314 Shutting down the firewall of the Datanode data node
Test MapReduce Reference http://www.cnblogs.com/xia520pi/archive/2012/05/16/2504205.html Create a folder input, create a test file Test1,test2 mkdir Input && CD input echo "a B C d e" > Test1 echo "a B C D f" > Test2Hadoop fs-put Input/
You can see that you have joined HDFs
Run WordCount cd/home/hadoop/hadoop-2.5.1/share/hadoop/mapreduce Hadoop jar Hadoop-mapreduce-examples-2.5.1.jar Wordcount/input/output
Self-hitting the package Hadoop jar Wordct.jar org. Wordcount/input/output
Hadoop fs-cat/output/part-r-00000
hadoop2.5.1 installing to a virtual machine