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

How to install and configure hadoop2.7.2 in ubuntu15.10

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces how to install and configure hadoop2.7.2 in ubuntu15.10. It is very detailed and has a certain reference value. Friends who are interested must read it!

The following code is entered in the command window (terminal) of ubuntu:

1. Tool preparation:

Update apt-get: it is convenient to use apt-get to install software from the command line window

Sudo apt-get update

Install vim: configuration file.

Sudo apt-get install vim

Depending on the output, you need to enter "Y" to continue.

two。 To create a hadoop user:

2.1 add hadoop users: create hadoop users and use / bin/bash as shell

Sudo useradd-m hadoop-s / bin/bash

2.2 set the password and enter the password twice as prompted:

Sudo passwd hadoop

2.3 increase administrator privileges for hadoop users:

Sudo adduser hadoop sudo

3. Install SSH and configure SSH login without password

SSH login is required for both cluster and single-node modes (similar to remote login, where you can log in to a Linux host and run commands on it). SSH client is installed by default in Ubuntu, and SSH server is also required:

Sudo apt-get install openssh-server

After installation, you can log in to this machine using the following command:

Ssh localhost

4. Install the java environment

4.1 install jdk:

Sudo apt-get install openjdk-8-jre openjdk-8-jdk

4.2 configure JAVA_HOME

Dpkg-L openjdk-8-jdk | grep'/ bin/javac'

This command outputs a path, except for the "/ bin/javac" at the end of the path, and all that is left is the correct path. If the output path is / usr/lib/jvm/java-8-openjdk/bin/javac, then the path we need is / usr/lib/jvm/java-8-openjdk.

If there is an error here, how do we know the address of JAVA_HOME? It's simple, enter:

Java-verbose

Output: usr/lib/jvm/java-8-openjdk/jre/lib/rt.jar

Then the preceding usr/lib/jvm/java-8-openjdk is the address of the JAVA_HOME.

Then, use the command sudo gedit / etc/profile to open the / etc/profile file:

Sudo gedit / etc/profile

Then add the following three lines at the end of the file:

Export JAVA_HOME=/usr/lib/jvm/java-8-openjdkCLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATHexport PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

Then ctrl+s saves it. Then execute the following code to make the changes take effect:

$source ~ / .bashrc

If the JAVA_HOME is still not changed, the file may not be in effect. Run

$source / etc/profile

If you look at the JAVA_HOME again, you can see that it is the path we set in the file.

If the above setting is correct, $JAVA_HOME/bin/java-version will output the version information of java, and the output result is the same as that of java-version. As shown in the following figure, the configuration is successful:

5. Install Hadoop

Download 5.1hadoop program: http://mirror.bit.edu.cn/apache/hadoop/common/

It is recommended that you choose to download hadoop-2.x.y.tar.gz under "stable".

5.2 hadoop installation

Enter the command:

Sudo tar-zxf ~ / Downloads/hadoop-2.7.2.tar.gz-C / usr/local cd / usr/local/sudo mv. / hadoop-2.7.2/. / hadoop sudo chown-R hadoop. / hadoop

Hadoop can be used after decompression. Enter the following command to check whether Hadoop is available, and if successful, the Hadoop version information will be displayed:

Cd / usr/local/hadoop./bin/hadoop version

5.3 hadoop Click configuration

The default mode of Hadoop is non-distributed mode and can be run without additional configuration. Non-distributed is a single Java process, which is convenient for debugging.

The configuration has not been completed yet. Due to the recent busy, I will reconfigure it after two days of leisure.

The above is all the contents of the article "how to install and configure hadoop2.7.2 in ubuntu15.10". Thank you for reading! Hope to share the content to help you, more related 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