The construction of Hadoop ha

Source: Internet
Author: User

1. First add the Hosts file

vim/etc/hosts10.0.110.56  msjtvl-dsjc-h0110.0.110.57  msjtvl-dsjc-h0310.0.110.58  msjtvl-dsjc-h0510.0.110.60  msjtvl-dsjc-h0210.0.110.61  msjtvl-dsjc-h04

2. Several machines do mutual trust

Setup passphraseless sshnow Check that you can ssh to the localhost without a passphrase:  $ ssh localhostif you cannot SSH to localhost without a passphrase, execute the following commands:  $ ssh-keygen-t dsa-p '-F ~/.ssh/id_dsa
   
    $ Cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
   

Copy the key files from several other machines to the msjtvl-dsjc-h01 Authorized_keys file

[email protected]. ssh]$ SCP [email protected]:/hadoop/.ssh/id_dsa.pub./id_dsa.pub2[[email protected]. ssh]$ SCP [ Email protected]:/hadoop/.ssh/id_dsa.pub./id_dsa.pub3[[email protected]. ssh]$ SCP [Email protected]:/hadoop/.ssh/id _dsa.pub./id_dsa.pub4[[email protected]. ssh]$ SCP [email protected]:/hadoop/.ssh/id_dsa.pub./id_dsa.pub5[[email Protected]. ssh]$ Cat ~/.ssh/id_dsa.pub2 >> ~/.ssh/authorized_keys[[email protected]. ssh]$ Cat ~/.ssh/id_ DSA.PUB3 >> ~/.ssh/authorized_keys[[email protected]. ssh]$ Cat ~/.ssh/id_dsa.pub4 >> ~/.ssh/authorized_ Keys[[email protected]. ssh]$ Cat ~/.ssh/id_dsa.pub5 >> ~/.ssh/authorized_keys

The above operation realizes the msjtvl-dsjc-h02,3,4,5 to msjtvl-dsjc-h01 without password login

Copy the Authorized_keys file on the msjtvl-dsjc-h01 to the other machines if all the trust of msjtvl-dsjc-h01-5 is fulfilled.

[Email protected] ~]$ SCP [email Protected]:/hadoop/.ssh/authorized_keys/hadoop/.ssh/authorized_keys

 

Download the appropriate tar package

wget http://apache.fayea.com/hadoop/common/hadoop-2.6.4/hadoop-2.6.4.tar.gz

The construction of Hadoop ha

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.