In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to install Hadoop 2.7cluster in Ubuntu 14. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.
Extract the downloaded JRE:
Ak@UBU14HADOOP01:~$ tar zxvf server-jre-7u80-linux-x64.tar.gz
Create a new Java directory in the USR directory:
Ak@UBU14HADOOP01:~$ sudo mkdir / usr/java
Copy the JRE file directory you just extracted to the new java directory above, and get the following directory:
Ak@UBU14HADOOP01:/usr/java$ lltotal 12drwxr-xr-x 3 root root 4096 Mar 7 11:49. / drwxr-xr-x 11 root root 4096 Mar 7 11:49.. / drwxr-xr-x 8 root root 4096 Mar 7 11:49 jdk1.7.0_80/
Modify the environment variable:
Modify the / etc/profile file by adding the following at the end of the file:
# Path Oracle JAVAJAVA_HOME=/usr/java/jdk1.7.0_80JRE_HOME=/usr/java/jdk1.7.0_80/jrePATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/binCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/libexport JAVA_HOME JRE_HOME PATH CLASSPATH
Reread the profile file to make the java directory effective:
Ak@UBU14HADOOP01:~$ source / etc/profile
Check Java-version to confirm whether the java path is valid. If you see the return of the following figure, the java setting is correct:
Ak@UBU14HADOOP01:~$ java-versionjava version "1.7.080" Java (TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot (TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
Download Hadoop 2.7.2 binary:
Ak@UBU14HADOOP02:~$ wget http://mirrors.cnnic.cn/apache/hadoop/common/hadoop-2.7.2/hadoop-2.7.2.tar.gz
Decompression
Ak@UBU14HADOOP02:~$ tar zxvf hadoop-2.7.2.tar.gz
SSH to local:
Ak@UBU14HADOOP01:~$ ssh localhost
The command returns the following result:
The authenticity of host 'localhost (:: 1)' can't be established.ECDSA key fingerprint is 45:3e:07:9e:1f:05:bf:9d:bc:1d:7c:18:aa:f5:03:f3.Are you sure you want to continue connecting (yes/no)? YesWarning: Permanently added 'localhost' (ECDSA) to the list of known hosts.ak@localhost's password:
This means that SSH has not been configured to log in without a password.
Use SSH-KEYGEN to generate the secret key and public key:
Ak@UBU14HADOOP01:~$ ssh-keygen-t dsa-P''- f ~ / .ssh/id_dsa
The running results are as follows:
Generating public/private dsa key pair.Your identification has been saved in / home/ak/.ssh/id_dsa.Your public key has been saved in / home/ak/.ssh/id_dsa.pub.The key fingerprint is:61:56:f3:b2:aa:8b:b0:df:cb:89:ea:6b:26:13:7d:eb ak@UBU14HADOOP01The key's randomart image is:+-- [DSA 1024]-+ | o | |. O | | +. . | | o. O | |. S. | |. . . . |. . | | o oo.= o | | * = = E Bo | +-+ |
The path where the files are stored is the .ssh directory under the current user's home road. Because there is a dot before the ssh name, the directory is hidden.
Use the following command to put the generated public key into anthorized_keys:
Ak@UBU14HADOOP01:~$ cat ~ / .ssh/id_dsa.pub > > ~ / .ssh/authorized_keys
Use the following command to modify the permissions of the authorized_keys file so that only this user can modify it:
Ak@UBU14HADOOP01:~$ chmod 0600 ~ / .ssh/authorized_keys
If you ssh locally again, the system will not be prompted for a password, which means the configuration is successful:
Ak@UBU14HADOOP01:~$ ssh localhostWelcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.19.0-51-generic x861664) * Documentation: https://help.ubuntu.com/ System information as of Mon Mar 7 12:11:46 CST 2016 System load: 0.08Processes: 146Usage of /: 11.0% of 17.34GB Users logged in: 1 Memory usage: 4 IP address For eth0: 192.168.88.90 Swap usage: 0 Graph this data and manage this system at: https://landscape.canonical.com/Last login: Mon Mar 7 12:11:47 2016 from localhostak@UBU14HADOOP01:~$ exitlogoutConnection to localhost closed. So much for sharing about how to install Hadoop 2.7 cluster in Ubuntu 14. I hope the above content can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.