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 Hadoop in linux

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

Share

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

This article will explain in detail how to install Hadoop in linux. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

One installation of JDK

1. Download JDK

The latest JDK:Java SE Development Kit 8u91

Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

two。 Decompression and installation

We install JDK to this path: / usr/lib/jvm

If you don't have this directory (of course not the first time), we'll create a new directory.

1 cd / usr/lib

2 sudo mkdir jvm

After the establishment, we went to the directory of the compressed package we just downloaded, unzipped it to the folder we just created, and changed the name to facilitate our management.

1 sudo tar zxvf. / jdk-8u91-linux-x64.tar.gz-C / usr/lib/jvm

2 cd / usr/lib/jvm

3 sudo mv jdk1.8.0_91/ jdk8

3. Configure environment variables

Gedit / .bashrc

Add at the end of the open file

Export JAVA_HOME=/usr/lib/jvm/jdk8

Export JRE_HOME=$ {JAVA_HOME} / jre

Export CLASSPATH=.:$ {JAVA_HOME} / lib:$ {JRE_HOME} / lib

Export PATH=$ {JAVA_HOME} / bin:$PATH

Save the exit, and then enter the following command to make it effective

Source / .bashrc

4. Configure the default JDK (this step can be omitted in general)

Because some Linux distributions already have default JDK, such as OpenJDK, and so on. So in order to make the JDK version we just installed become the default JDK version, we also need to make the following configuration.

Execute the following command:

Sudo update-alternatives-install / usr/bin/java java / usr/lib/jvm/jdk8/bin/java 300

Sudo update-alternatives-install / usr/bin/javac javac / usr/lib/jvm/jdk8/bin/javac 300

Note: if the above two commands can not find the path problem, just restart the computer to repeat the above two lines of code will OK.

5. Verify that the installation is successful

Michael@ubuntu:~$ java-version

Java version "1.8.0,91"

Java (TM) SE Runtime Environment (build 1.8.0_91-b14)

Java HotSpot (TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Second configuration SSH

Michael@ubuntu:~$ sudo apt-get install ssh

[sudo] password for michael:

Michael@ubuntu:~$ ls-a / home/michael

. .dmrc .local. Python-eggs

.. Documents. Mission-control redis-3.2.0

.bash _ history Downloads .mozilla redis-3.2.0.tar.gz

.bash _ logout examples.desktop Music .rediscli _ history

.bashrc ez_setup.py .oracle _ jre_usage Templates

.bashrc ~ .fontconfig. Pam _ environment. Thumbnails

.cache .gconf Pictures Videos

.compiz-1 .gnome2 .profile .Xauthority

.config. Gtk-bookmarks Public. Xsession-errors

.dbus .gvfs .pulse. Xsession-errors.old

Desktop .ICEauthority. Pulse-cookie

Michael@ubuntu:~$ cd .ssh

Bash: cd: .ssh: No such file or directory

Michael@ubuntu:~$ ssh-keygen-t dsa-P''- f ~ / .ssh/id_dsa

Generating public/private dsa key pair.

Created directory'/ home/michael/.ssh'.

Your identification has been saved in / home/michael/.ssh/id_dsa.

Your public key has been saved in / home/michael/.ssh/id_dsa.pub.

The key fingerprint is:

A8:c1:14:50:51:a8:4f:51:05:92:fe:b3:f0:1c:be:71 michael@ubuntu

The key's randomart p_w_picpath is:

+-[DSA 1024]-+

| | .o = * + o. |

| | + o |

| o.. | |

| .oo. | |

| | oo.. | S |

| | oo+ |

|. =. + E |

| | = o |

|. | |

+-+

Michael@ubuntu:~$ cat ~ / .ssh/id_dsa.pub > > ~ / .ssh/authorized_keys

Michael@ubuntu:~$ ssh-version

OpenSSH_5.9p1 Debian-5ubuntu1.9, OpenSSL 1.0.1 14 Mar 2012

Bad escape character 'rsion'.

Michael@ubuntu:~$ ssh localhost

The authenticity of host 'localhost (127.0.0.1)' can't be established.

ECDSA key fingerprint is b7:fe:dc:32:13:c0:d6:2f:20:1b:ea:c8:ab:ab:c6:55.

Are you sure you want to continue connecting (yes/no)? Y

Please type 'yes' or' no': yes

Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.

Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-generic x86room64)

* Documentation: https://help.ubuntu.com/

New release '14.04.4 LTS' available.

Run 'do-release-upgrade' to upgrade to it.

Last login: Tue May 24 07:20:17 2016

This is the end of the article on "how to install Hadoop in linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please 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.

Share To

Internet Technology

Wechat

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

12
Report