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

Initialization Construction of hadoop Environment

2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

1. First, download the hadoop binary package and the jdk file package, and place them in the path of the appropriate directory to decompress them (step omitted)

2. Create a directory unzipped by hadoop on the master machine to store hdfs files, and send the extracted jdk package to the slave machine.

Third, add environmental variables

Set the environment variable JAVA_HOME for JDK. You need to modify the configuration file / etc/profile to add the following:

Export JAVA_HOME=/usr/local/src/jdk1.6.0_45

# export JRE_HOME=$JAVA_HOME/jre

Export PATH=$JAVE_HOME/bin:$JAVA_HOME/bin:$PATH

Export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib

After the modification, execute source / etc/profile

Execute java-version, and you can see that the installation is complete.

[root@spark ~] # java-version

Java version "1.6.045"

Java (TM) SE Runtime Environment (build 1.6.0_45-b06)

Java HotSpot (TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

4. Modify / etc/hosts and / etc/sysconfig/network (one master and two slaves)

Deploy the public key, and then cat id_rsa.pub > > authorized_keys

6. Transfer hosts, authorized_keys files and / etc/profile to the slave machine.

7. Edit hadoop files

Add the location of the java environment variable at the end of the hadoop_env.sh in hadoop/conf

Export JAVA_HOME=/usr/local/src/jdk1.6.0_45

8. Scp the entire directory of hadoop that has been configured on the host to the slave machine.

9. Execute the bin directory of hadoop on the host:

①. / hadoop namenode-format

②. / start-all.sh

Check if there is anything wrong with the hadoop environment

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

Internet Technology

Wechat

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

12
Report