Hadoop-1.2.1 Cluster virtual machine setup (UP)--environment preparation

Source: Internet
Author: User

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:allHadoopFor 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.