Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of hadoop1.1.2 Cluster installation

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you a sample analysis of hadoop1.1.2 cluster installation, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Build hadoop cluster a > vmbox replication or vmware clone to get a new virtual machine b > create a new ip--Connection modification, then fix an IP value c > modify hostname 1 modify hostname

(1) execute the command hostname cloud4 to modify the hostname in the session

(2) Verification: execute the command hostname

(3) execute the command vi / etc/sysconfig/network to modify the hostname in the file

(4) Verification: execute the command reboot-h now to restart the machine

2 set the binding between ip and hostname

(1) execute the command vi / etc/hosts

Add a line of 192.168.80.101 cloud41 at the end of the text

(2) Verification: ping cloud4

(3) configure the ip corresponding to the hostname in window

C:\ Windows\ System32\ drivers\ etc\ hosts

D > ssh password-free login

If you create a new project, you need to configure it.

/ / (1) execute the command ssh-keygen-t rsa (then Enter all the way) to generate the key at / root/.ssh/

/ / (2) execute the command cp / root/.ssh/id_rsa.pub / root/.ssh/authorized_keys to generate the license file

/ / (3) Verification: ssh localhost

If the immediate next step of the clone:

Judge whether the password configuration of this system is successful:

Ssh cloud4 (ssh hostname)

(the master node sends the password to the slave node)

Ssh-copy-id-I cloud41

Go to slave node

Ssh cloud41

(pass the password from the slave node to the master node)

Ssh-copy-id-I cloud4

E > copy the jdk and hadoop of the primary node to each other

(- r recursion)

Scp-r / usr/local/jdk cloud41:/usr/local

Scp-r / usr/local/hadoop cloud41:/usr/local

Scp / etc/profile cloud41:/etc

Source / etc/profile configuration file takes effect

F > modify hadoop/conf/slaves to add slave node

The child node can be-Slaves content as follows:

Localhost (yes or no, determine whether you want the master node to store data, usually the dataNode is placed in the slave node)

Cloud41,cloud42

G > starts at the master node, and the slave node does not execute the following command to format the namenode of hadoop

Hadoop namenode-format

Start-all.sh

H > if the configuration is successful, the primary node:

[root@cloud41 ~] # jps

4020 NameNode

4353 JobTracker

4466 TaskTracker

4508 Jps

4275 SecondaryNameNode

4154 DataNode

Slave node:

[root@cloud41 ~] # jps

3286 TaskTracker

3352 Jps

3194 DataNode

I > addition of new nodes: 1. Start a new node: (datanode,tasktracker)

Hadoop/bin

Hadoop-daemon.sh start datanode

Hadoop-daemon.sh start tasktracker

two。 Re-get the slave node at the master node

Hadoop dfsadmin-refreshNodes

3. Primary node sets load balancer

Hadoop/bin

(optional) execute the load balancing command start-balance.sh on the primary node

4. Modify the number of copies

Hadoop fs-setrep 2 / hello

5. Modify safe mode status

Hadoop dfsadmin-safemode leave | enter | get (leave means to turn off safe mode)

The above is all the contents of the article "sample Analysis of hadoop1.1.2 Cluster installation". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report