Install pseudo-distributed Hadoop under Ubuntu

Source: Internet
Author: User

Installation Preparation:(1) Hadoop installation package: hadoop-1.2.1.tar.gz(2) JDK installation package: jdk-7u60-linux-i586.gz(3) The Eclipse installation package and the Eclipse and Hadoop-related jar packages are required if eclipse development is required.
Installation:(1) can choose a new user installation can also use the current account. (2) Specify the user group to be owned:
(3) to give users Hadoop privileges:sudo vim/etc/sudoers changes added:

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvegrfmtiy/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/center ">when it comes to vim Ubuntu itself is the vim tiny is not available need to use is the VIM full version number need to download the installation:sudo apt-get remove Vim-commonsudo apt-get install vim Some of the configuration of vim itself can be set according to your preferences. (4) Installing the JDK:depending on your needs, choose the installation path, sudo mkdir/usr/javatar-zxvf jdk-7u60-linux-i586.gz MV jdk-1.7.0 JDK (change name can not be set (best)) to delete an installation package: (5) Configuring the JDK environment: sudo vim/etc/profile join
Update (required): Source/etc/profile Test:
the JDK is complete. (6) SSH free password:General Ssh-client included in Ubuntu system, but Ssh-server is not installed, can be tested by SSH IP; installing Ssh-server:sudo apt-get install SSH after installation, do the following:

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvegrfmtiy/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/center ">
Generated:





SSH can log in.

(7) Installing Hadoopthe ability to create a Hadoop to a directory first: sudo mkdir/usr/hadoop cd/usr/hadoop/sudo tar-zxvf hadoop-1.2.1.tar.gz sudo mv hadoop-1.2.1 Hadoop sudo chown-r hadoop:hadoop Hadoop gives Hadoop users access to directory Hadoop read sudo rm-rf hadoop-1.2.1.tar.gz configuration is required after installation:Configure/etc/profile join: sudo vim/etc/profile
to configure the hadoop-env.sh file: sudo vim/usr/hadoop/conf/hadoop-env.sh:

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvegrfmtiy/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/center ">

Create a directory: Used to configure Hadoop.tmp.dir parameters:sudo mkdir/usr/hadoop/tmp
to configure the core file: Core-site.xml:

Hdfs-site.xml:

Mapred-site.xml:

start: Because the previous configuration input:To Format a node: Hadoop namenode-formatStart: start-all.sh JPS View

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvegrfmtiy/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/center ">
stop: stop-all.sh
(8) Installing Eclipsefirst create a directory unzip the installation ....
Getting in and starting eclipse has a small problem:Eclipse cannot find the JDK or JRESolution:cd/home/hadoop/eclipse (install eclipse) sudo ln-sf $JRE _home JRE That 's it:
for Eclipse configuration Hadoop copies the associated plug-in to eclipse into the plugins directory:

start eclipse:window->perferences:

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvegrfmtiy/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/center ">
The installation folder for Hadoop.

Settings: Right-click the following blank area:
Appears: and configures

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvegrfmtiy/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/center ">


Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvegrfmtiy/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/center ">

Point to the left side of the small elephant:

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvegrfmtiy/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/center ">
Eclipse configuration is complete.


Later you can write your job in Eclipse and then run it to the terminal.
configuration encountered problems: Namenode Datanode not up: The solutions are for example the following: (1) Delete/usr/hadoop/tmp (2) in creation: sudo mkdir/usr/hadoop/tmp (3) Delete all files starting with Hadoop in the/tmp directory: sudo rm-rf/tmp/hadoop* (4) Formatting again: Hadoop namenode-format (5) Start start-all.sh

Install pseudo-distributed Hadoop under Ubuntu

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.