Ubuntu 12.04 Build Hadoop stand-alone environment __hadoop

Source: Internet
Author: User

At the beginning of November, we learned about Ubuntu 12.04 's way of building a Hadoop cluster environment, and today we'll look at how Ubuntu12.04 builds Hadoop in a stand-alone environment.

A. You want to install Ubuntu this step is omitted;

Two. Create a Hadoop user group and user under Ubuntu;

1. Create a Hadoop user group:

sudo addgroup Hadoop

As shown in figure:

2. Create a Hadoop User:

sudo adduser-ingroup Hadoop Hadoop

As shown in figure:

3. Add permissions to the Hadoop user to open the/etc/sudoers file:

sudo gedit/etc/sudoers

Pressing ENTER will open the/etc/sudoers file, giving the Hadoop user the same permissions as the root user.

Add the Hadoop all= (All:all) all under root all= (All:all) all,

Hadoop all= (All:all) all

As shown in figure:

Three. Install JDK under Ubuntu

Execute with the following command:

sudo apt-get install Openjdk-6-jre

As shown in figure:

Four. Modify Machine name

Every time the Ubuntu installation succeeds, our machine name defaults to: Ubuntu, but in order to be able to easily distinguish the servers in the cluster, we need to give each machine a different names. The machine name is determined by the/etc/hostname file.

1. Open/etc/hostname File:

sudo gedit/etc/hostname

2. Change the Ubuntu in the/etc/hostname file to the name of the machine you want to take. Here I take "Dubin-ubuntu". The system will not take effect until it is restarted.

Five. Install SSH service

SSH here and the three broad framework: Spring,struts,hibernate does not matter, SSH can achieve remote login and management, can refer to other relevant information.

Install Openssh-server,

sudo apt-get install SSH openssh-server

If you have already installed SSH, you can proceed to the sixth step OH

vi. Establishment of SSH password-free login this machine

First to convert to a Hadoop user, execute the following command:

Su-hadoop

As shown in figure:

The SSH generation Key has RSA and DSA two ways of generation, by default, RSA approach.

1. Create Ssh-key, here we use RSA Way:

Ssh-keygen-t rsa-p ""

As shown in figure:

(Note: Two files are generated under ~/.ssh/after a carriage return: Id_rsa and id_rsa.pub These two files appear in pairs)

2. Into the ~/.ssh/directory, the Id_rsa.pub appended to the Authorized_keys authorization file, the beginning is not Authorized_keys file:

CD ~/.ssh
Cat Id_rsa.pub >> Authorized_keys

As shown in figure:

(After completion, you can log on to this machine without a password.) )

3. Login localhost:

SSH localhost

As shown in figure:

(Note: When SSH telnet to another machine, you now control the remote machine, you need to perform an exit command to regain control of the local host.) )

4. Execute Exit Command:

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.