Install and configure Hadoop0.20.2 in Ubuntu

Source: Internet
Author: User
1. Install JDK (1) download and install JDK: Make sure that the computer is connected after the command line enter the following command to install JDKsudoapt-getinstallsun-java6-jdk (2) configure the computer Java environment: Open/etc/profile, enter the following content at the end of the file: exportJAVA_HOME = (Java installation directory) exportCLASSPATH = ".: $ JAVA_HOME/lib: $ CLAS

1. Install JDK
(1) download and install JDK: After the computer is connected to the Internet, run the following command to install JDK:
Sudo apt-get install sun-java6-jdk
(2) configure the computer Java environment: Open/etc/profile and enter the following content at the end of the file.
Export JAVA_HOME = (Java installation directory)
Export CLASSPATH = ".: $ JAVA_HOME/lib: $ CLASSPATH"
Export PATH = "$ JAVA_HOME/: PATH"
(3) Verify that Java is successfully installed
If you enter java-version and the Java version information is output, the installation is successful.

2. install and configure SSH

(1) download and install SSH: Enter the following command on the command line to install SSH:
Sudo apt-get install ssh
(2) Configure logon to the local machine without a password: Enter the following two commands in the command line:
Ssh-keygen-t dsa-P "-f ~ /. Ssh/id_dsa
Cat ~ /. Ssh/id_dsa.pub> ~ /. Ssh/authorized_keys
(3) Verify that SSH is successfully installed
Enter ssh localhost. If the local logon is successful, the installation is successful.

3. Install and run Hadoop (version 0.20.2 is used as an example)

(1) download Hadoop: Download hadoopon the page http://www.apache.org/dyn/closer.cgi/hadoop/core.

(2) install and configure Hadoop

Single Node Configuration:
You do not need to configure a single-node Hadoop installation. In this way, Hadoop is considered as a separate Java Process.
Pseudo distribution Configuration:
A pseudo-distributed Hadoop cluster has only one node. In this cluster, the computer is both master and slave, even if namenode is also datanode, it is both jobtracker and tasktracker.

The configuration process is as follows:

A. Go to the conf folder and modify the following files.
Add the following content to the Hadoop-env.sh:
Export JAVA_HOME = (JAVA installation directory)
The contents of the core-site.xml file are modified to the following:
  
  
   Fs. default. name
   Hdfs: // localhost: 9000
  
  
The contents of the hdfs-site.xml file are modified to the following:
  
  
   Fs. replication
   1
  
  
The contents of the mapred-site.xml file are modified to the following:
  
  
   Mapred. job. tracker
   Localhost: 9001
  
  

B. format the Hadoop file system and enter the following command in the command line:
Bin/hadoop namenode-format

C. Start Hadoop and enter the following command in the command line:
Bin/start-all.sh

D. Verify that Hadoop is successfully installed. Enter the following URL in the browser. If it is enabled, the installation is successful.
Http: // localhost: 50030 (mapreduce web page)
Http: // localhost: 50070 (hdfs web page)

Related Article

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.