VM Virtual MachinesConfiguration:
NAT Network Configuration Reference: http://www.cnblogs.com/gongice/p/4337379.html install pre-Hadoop equipment (on each host): Configure sudo (optional):
[[email protected] Hadoop] # chmod u+w/etc/sudoers [[email protected] Hadoop] # vi/etc/sudoers
Add a row of data:
Hadoop all= (All) Nopasswd:all,
HadoopFor sudo password-free user host name setting:
[[email protected] Hadoop] # vi/etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.153.101 hadoop01 192.168.153.102 hadoop02192.168.153.103 hadoop03
Close iptable:
[[email protected] Hadoop] # sudo chkconfig iptables off [[email protected] Hadoop] # sudo/etc/init.d/iptables Stop iptables:flushing firewall rules: [OK filter [OK ]iptables:unloading modules: [OK]
To turn off SELinux:
[[email protected] install]#sudo vi/etc/selinux/config#This file controls the state of the SELinux on the system.#selinux= can take one of these three values:#Enforcing-selinux security policy is enforced.#Permissive-selinux prints warnings instead of enforcing.#disabled-no SELinux policy is loaded.selinux=Disabled#Selinuxtype= can take one of these the values:#targeted-targeted processes is protected,#Mls-multi level Security protection.selinuxtype=targeted
NTP service configuration: Reference: http://www.cnblogs.com/gongice/p/4338204.html Configure Login-free: Generate public and private keys on each host:
[Email protected] ~]$ mkdir ~/. SSH [Hadoop@hadoop01 ~]$ chmod-~/. SSH [Hadoop-F ~/.ssh/
ID_DSA [Hadoop @hadoop02 ~]$ mkdir ~/
. SSH [Hadoop@hadoop02 ~]$ chmod ' ~/
. SSH [Hadoop-
F
-
F ~/.SSH/ID_DSA
Copy the id_dsa.pub of the slave host to the master host:
[email protected]. ssh]$ SCP id_dsa.pub [email protected]:/home/hadoop/.ssh/id_dsa.pub.hadoop02[hadoop@ hadoop03. ssh]$ SCP id_dsa.pub [email protected]:/home/hadoop/.ssh/ID_DSA.PUB.HADOOP03
Masters All Id_dsa.pub concentrated:
[email protected]. ssh]$ cat id_dsa.pub >> authorized_keys[hadoop@hadoop01. ssh]$ Cat Id_ DSA.PUB.HADOOP02 >> authorized_keys[hadoop@hadoop01. ssh]$ Cat id_dsa.pub.hadoop03 >> Authorized_keys
Distribute the Authorized_keys on the master host to each slave host:
[email protected]. ssh]$ SCP Authorized_keys [email protected]:/home/hadoop/.ssh/authorized_keys[hadoop@ Hadoop01. ssh]$ SCP Authorized_keys [email protected]:/home/hadoop/.ssh/Authorized_keys
To install the JDK:
sudo tar-xvf jdk-7u55-linux--R root:root jdk1.7.0_55
JDK1.7.0_55 is generated after successful installation, confirming that the directory permission is drwxr-xr-x (755)
vi/etc/profileexport java_home=/usr/lib/java/jdk1.7. 0_55export PATH=$JAVA _home/bin: $PATH
[Email protected] java]$ source/etc/profile[hadoop@hadoop01 java]$ java-"1.7.0_55 "1.7.0_55-64-bit Server VM (build 24.55-b03, Mixed mode)
Hadoop-1.2.1 Cluster virtual machine setup (UP)--environment preparation