Hadoop stand-alone installation process (the problem occurred in the middle but has been resolved)

1. Prerequisites

Complete the installation of VMware station and the installation of ubuntu image files, the installation of xshell, xftp software and the configuration of jdk

VMware station (ubuntu image file), xshell, xftp installation and connection configuration jdk environment

Two, installation steps

1. The compressed package of hadoop has been uploaded before, so decompress it directly here:

sudo tar xvf hadoop-2.7.2.tar.gz

Insert picture description here

2. After unzipping, move it to the previous hadoop folder

sudo mv hadoop-2.7.2 /home/java

Insert picture description here

3. Configure the environment variables of hadoop, after entering:
sudo vi .profile
Insert picture description here

4. Copy the environment variables to the bottom of the file, pay attention to the configured folder, here is the Java folder under home, with java in front of it, to prevent other errors from occurring temporarily, do not change it:
export HADOOP_HOME=/home/ java/hadoop-2.7.2
export CLASSPATH=.: JAVAHOME / lib: JAVA_HOME/lib:JAVAHOME/lib:JRE_HOME/lib: C L A S S P A T H : CLASSPATH: CLASSPATH:HADOOP_HOME/share/hadoop/common/hadoop-common-2.7.2.jar: H A D O O P H O M E / s h a r e / h a d o o p / m a p r e d u c e / h a d o o p − m a p r e d u c e − c l i e n t − c o r e − 2.7.2. j a r : HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.7.2.jar: HADOOPHOME/share/hadoop/mapreduce/hadoopmapreduceclientcore2.7.2.jar:HADOOP_HOME/share/hadoop/common/lib/commons-cli-1.2.jar
export PATH= J A V A H O M E / b i n : JAVA_HOME/bin: JAVAHOME/bin:JRE_HOME/bin: H A D O O P H O M E / s b i n : HADOOP_HOME/sbin: HADOOPHOME/sbin:HADOOP_HOME/bin:$PATH

After the above one entered and copied the content, I found that pressing esc was useless, and then I could use shift+: and then enter wq! to force save and exit.

5. After the configuration is complete, enter source /etc/profile to update the configuration
and then enter hadoop version to see if the configuration is successful.

Three, the solution after the configuration fails

Insert picture description here

I checked here to see if this problem occurred when the configuration was successful. Later I found that there was a problem with the previously configured jdk environment, because there is no jdk1.8 folder under my java folder, so I need to change the configuration of Java_home

Insert picture description here

After the change: shift+:wq! Forced to save and exit, then source /etc/profile, enter Java -version, it shows that the jdk environment is no problem, and then repeat the above 3 and 4 steps, after the completion of hadoop version shows that the installation is successful .

Insert picture description here

Guess you like

Origin blog.csdn.net/Zheng_lan/article/details/109000639