Build a pseudo-distributed environment of Hadoop0.20.203.0 on Ubuntu11.04

Source: Internet
Author: User
In the process of setting up this environment, I had a lot of detours and struggled for several days. I used to transfer files between Windows OS and Ubuntu on vmwarevm, I checked a lot of information on the Internet through sharedfolder to share files between virtual machines and physical hosts. However, I tried many times and installed many new Ubuntu operating systems, however, the file is still not passed through the sharedfolder method. Finally, I learned that if VMwareTool is installed

In the process of setting up this environment, I had a lot of detours and struggled for several days. I used to transfer files between Windows OS and Ubuntu on vmwarevm, I checked a lot of information on the Internet through shared folder to share files between virtual machines and physical hosts. However, I tried many times and installed many new Ubuntu operating systems, however, the shared folder method is still not used to pass the file. Finally, I learned that if VMwareTools is installed, files on the physical host can be directly copied to the virtual machine. At that time, I felt like I had to solve the problem for several days. But when I copied the java installation file from the physical host to the virtual machine, the file is not transmitted in binary mode. Therefore, an error occurs during installation on the Ubuntu operating system. Therefore, a java installation file is downloaded from the VM. And set environment variables. Then Install ssh. Data is transmitted before the user's machine.

Install hadoopand download the latest hadoopinstallation file, hadoop-0.511203.0rc1.tar.gz. Then a folder is created.

$ Mkdir hadoop

Unzipping: $ tar zxvf hadoop-0.20.203.0rc1.tar.gz

$ Ls

Then set the environment variable.

$ Gedit conf/hadoop-env.sh

Add java environment variables:

Export JAVA_HOME =/home/moguichi/java/jdk1.6.0 _ 25, which is the installation path of my jdk.

I thought it was okay to set the java environment for hadoop running, but an error was prompted when running the wordcount example. After online query, you can see that hadoop's hdfs node is not configured. Then you need to set the core-site.xml as follows

$ Gedit conf/core-site.xml

Add in the middle:

Fs. default. name

Hdfs: // localhost: 9000

In setting up hdfs-site.xml

Also add in the middle:

Dfs. replication

1

Then set the mapred-site.xml to also add in the middle

Mapred. job. tracker

Localhost: 9001

Finally run the wordcount instance:

Format HDFS

$ Bin/hadoop namenode-format

Password-free SSH settings

Now, make sure you do not enter the password. log on to localhost Using SSH:

$ Ssh localhost

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.