First, the preparation conditions:
1. Four Linux virtual machines (1 namenode nodes, 1 secondary nodes (secondary and 1 datanode shared), plus 2 datanode)
2. Download the Hadoop version, this example uses the Hadoop-2.5.2 version
Second, install Java JDK
Best installed, JDK 1.7 is best for JDK 1.7 compatibility
-IVH jdk-7u79-linux-/root/. Bash_profilejava_home=/usr/java/jdk1. 7 . 0_79path= $PATH: $JAVA _home/binexport hadoop_home=/usr/local/hadoop-2.5. 1 PATH= $PATH: $HADOOP _home/bin
#HADOOP_HOME is to be used in the back, in order to facilitate written in advance
After the configuration is complete, you can see if the installation was successful by java-version
Third, configure the Hosts file
vi/etc/hosts# build 192.168.171.15 node5192.168.171.16 node6 in this file 192.168.171.17 node7192.168.171.18 node8
Iv. Installing SSH settings password-free login
# Create the key (be sure to on the Namenode node): - F ~/.ssh/id_dsa# add key to public key:cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized _keys
Hadoop 1, HDFS installation on virtual machines