Hadoop Installation Tutorial _ standalone/pseudo-distributed configuration _hadoop2.8.0/ubuntu16

Source: Internet
Author: User
Tags hash ssh centos ssh server

Follow the Hadoop installation tutorial _ standalone/pseudo-distributed configuration _hadoop2.6.0/ubuntu14.04 (http://www.powerxing.com/install-hadoop/) to complete the installation of Hadoop, My system is hadoop2.8.0/ubuntu16.

Hadoop Installation Tutorial _ standalone/pseudo-distributed configuration _hadoop2.6.0/ubuntu14.04

When you start to practice Hadoop, installing Hadoop often becomes a threshold for beginners. Although the installation is actually very simple, the book has written that the official website also has the Hadoop installation configuration tutorial, but because of the Linux environment is not familiar with the book on the official website simple installation steps novice often hold. Plus online A lot of tutorials is also very pit, leading to novice toss the old days Leng not installed Well, is a shock learning enthusiasm.

This tutorial is suitable for native Hadoop 2, including Hadoop 2.6.0, Hadoop 2.7.1 and other versions, the main reference to the official installation tutorials, detailed steps, with appropriate instructions, I believe that follow the steps to smooth installation and operation of Hadoop. There is also a simplified version of the Hadoop installation configuration for easy-to-base readers to quickly complete the installation. In addition, it is hoped that readers can learn more about Linux and solve problems in the future. This tutorial by the Force star produced, reproduced please specify.

Environment

This tutorial uses Ubuntu 14.04 64-bit as a system environment (Ubuntu 12.04 is OK, 32-bit, 64-bit is available), please install the system yourself.

If you are using a centos/redhat system, check out the corresponding CentOS installation Hadoop tutorial, single-machine pseudo-distributed configuration.

This tutorial, based on native Hadoop 2, is validated in the Hadoop 2.6.0 (Stable) version and is suitable for any Hadoop 2.x.y version, such as Hadoop 2.4.1. Hadoop version

There are two major versions of Hadoop, Hadoop 1.x.y and the Hadoop 2.x.y series, and older textbooks may be using 0.20 of these versions. The Hadoop 2.x version is constantly updated and is available for this tutorial. If you need to install such a version of 0.20,1.2.1, this tutorial can also be used as a reference, the main difference is the configuration items, configuration Please refer to the official website tutorial or other tutorials.

The new version is compatible with older versions of the code, which should be able to run normally (I do not verify it myself and welcome validation feedback).

Once you've installed your Ubuntu system, you'll need to do some work before you install Hadoop. Create a Hadoop user

If you are not using "Hadoop" users when you install Ubuntu, you need to add a user named Hadoop.

First press Ctrl+alt+t to open the Terminal window, enter the following command to create a new user:

    
    
     
     sudo useradd-m hadoop-s/bin/bash
    
    
Shell command

This command creates a Hadoop user that can log in and uses/bin/bash as the shell. Ubuntu Terminal Copy and paste shortcut keys

In the Ubuntu Terminal window, the copy-and-paste shortcuts need to be added with shift, that is, paste is ctrl+shift+v.

Then use the following command to set the password, can be easily set to Hadoop, as prompted to enter the password two times:

    
    
     
     sudo passwd Hadoop
    
    
Shell command

Add administrator privileges to Hadoop users for ease of deployment and avoid some tricky permissions issues for newbies:

    
    
     
     sudo adduser hadoop sudo
    
    
Shell command

Finally log off the current user (tap the gear in the upper-right corner of the screen, select logout) and log in using the Hadoop user you just created in the login interface. Update apt

After logging in with a Hadoop user, we'll update apt, and we'll use apt to install the software, and there may be some software that can't be installed if it's not updated. Press Ctrl+alt+t to open the terminal window and execute the following command:

    
    
     
     sudo apt-get update
    
    
Shell command

If the following "hash check and inconsistent" prompt, you can change the software source to resolve. If you do not have the problem, you do not need to change it.

Ubuntu Update software source encountered hash checksum mismatch problem

Click to view: How to change the software source

Subsequent needs to change some configuration files, I prefer to use VIM (vi enhanced version, basic usage of the same), it is recommended to install (if you really do not use Vi/vim, please use the following vim to Gedit, so you can use a text editor to modify, And each time the file changes completed, please close the entire gedit program, otherwise it will occupy the terminal):

    
    
     
     sudo apt-get install vim
    
    
Shell command

If you need confirmation when installing the software, enter Y at the prompt.

Install SSH via command line , configure SSH login without password

The cluster, single-node mode requires SSH login (similar to remote login, you can log on to a Linux host and run commands on it), Ubuntu has the SSH client installed by default, and also needs to install SSH server:

    
    
     
     sudo apt-get install Openssh-server
    
    
Shell command

After installation, you can use the following command to log on to the machine:

    
    
     
     SSH localhost
    
    
Shell command

At this point, you will be prompted with the following (SSH first login hint), enter Yes. Then follow the prompts to enter the password Hadoop, so it landed on the machine.

SSH First Login Tips

But this login is required to enter the password every time, we need to configure SSH without password login more convenient.

First exit the SSH just now, go back to our original terminal window, then use Ssh-keygen to generate the key and add the key to the authorization:

    
    
     
     Exit                           # quit SSH localhost
     
     cd ~/.ssh/                     # If there is no such directory, please first execute SSH localhost
     
     ssh-keygen-t RSA              # will be prompted, press ENTER to
     
     Cat./id_rsa.pub >>./authorized_keys  # Join license
    
    
What the shell command ~ means

In a Linux system, ~ represents the user's home folder, the "/home/User name" directory, such as your user name is Hadoop, then ~ represents "/home/hadoop/". In addition, the text after # in the command is a comment.

At this point, ssh localhost command, no need to enter the password can be directly landed, as shown in the figure below.

SSH without password login install Java environment

The Java environment can choose Oracle's JDK, or OpenJDK, according to Http://wiki.apache.org/hadoop/HadoopJavaVersions, the new version under OpenJDK 1.7 is no problem. Convenient for the diagram, this side directly through the command to install OpenJDK 7.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.