Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Installation and configuration of hadoop

Shulou Source: shulou.com Published: 2022-06-03 04:48:23 10月03日 Update

Hadoop version

There are two major versions of Hadoop, Hadoop 1.x.y and Hadoop 2.x.y series. 1.x.y large number of companies have updated Hadoop 2.x version, this tutorial is applicable.

Basic environment: Centos 6.5 jdk1.7.0_67 hadoop2.5.1

1. Configure jdk

1) download the jdk version

Try jdk-7u67-linux-x64.war.gz for this tutorial

2) create the decompression directory

Mkdir / usr/local/java

3) move jdk to / usr/local/java

Mv jdk-7u67-linux-x64.war.gz / usr/local/java

4) decompress jdk

Tar-xvf jdk-7u67-letcinux-x64.war.gz

5) configure the environment

Edit ~ / .bash_profile file (can be configured in / etc/profile, but not recommended)

1.vi / .bash_profile

2.JAVA_HOME = / usr/local/java/jdk1.7.0_67

3. CLASSPATH. : $JAVA_HOME/lib/*.jar

4.PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin

5. Quit editing and source ~ / .bash_profile

6. Verify java-version

2. Install and configure hadoop

1) download the hadoop version

This tutorial uses hadoop2.5.1.war.gz

2) create the decompression directory

Mkdir / usr/local/hadoop

3) move hadoop to / usr/local/hadoop

Mv hadoop2.5.1.war.gz / usr/local/hadoop

4) decompress hadoop

Tar-xvf hadoop2.5.1.war.gz

5) configure the environment

Edit ~ / .bash_profile file

1.vi / .bash_profile

2.HADOOP_HOME=/usr/local/hadoop2.6.4

4.PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/jre/bin

5. Quit editing and source ~ / .bash_profile

5.2) configure etc/hadoop/hadoop-env.sh,etc/hadoop/core-site.xml,hdfs-site.xml, etc/hadoop/salves

Http://hadoop.apache.org/docs/r2.5.2/hadoop-project-dist/hadoop-common/SingleCluster.html

1. Configure hadoop-env.sh

Directory of export JAVA_HOME=/*your jdk * /

two。 Configure core-site.xml (please refer to the official documentation)

Fs.defaultFS

Hostname of hdfs://localhost:9000 / * * your * * /

3. Configure hdfs-site.xml

Dfs.replication

one

4. Configure salves

Host name of the your

6) turn off the temporary firewall

1) service iptables stop

2) chkconfig iptables off

7) formatting

Hadoop namenode-format

8) Verification

Start-hdfs.sh

8) jps production status

2135 NodeManager

5087 SecondaryNameNode

2054 ResourceManager

9053 Jps

4891 DataNode

7489 NameNode

9) Web page view

Yourip:50070 (windows does not add host, just use IP address)

Tags: Configuration tutorials versions environment directories files books mobile verification two host company address large number official suggestions documents host format status Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Huawei Shulou Tech Info OPPO Reno MySQL