Hadoop installation and configuration-pseudo Distribution Mode

Source: Internet
Author: User
Tags xsl

1. Install

Here the installation of hadoop-0.20.2 as an Example

Install Java first. Refer to this

Download hadoop

Extract

tar -xzf hadoop-0.20.2

 

2. Configuration

Modify Environment Variables

Vim ~ /. Bashrcexport hadoop_home =/home/RTE/hadoop-0.20.2 # The directory location export path for actual hadoop decompression here = $ path: $ hadoop_home/binsource ~ /. Bashrc

Configure hadoop-env.sh

vim conf/hadoop-env.shexport JAVA_HOME=/home/rte/Software/java/jdk1.6.0_27

Configure CONF/core-site.xml, CONF/hdfs-site.xml, CONF/mapred-site.xml File

File: core-site.xml

<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Put site-specific property overrides in this file. --><configuration>    <property>        <name>fs.default.name</name>        <value>hdfs://localhost:9000</value>    </property></configuration>

File: mapred-site.xml

<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Put site-specific property overrides in this file. --><configuration>        <property>                <name>mapred.job.tracker</name>                <value>localhost:9001</value>         </property></configuration>

File: hdfs-site.xml

<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Put site-specific property overrides in this file. --><configuration>        <property>                <name>dfs.replication</name>                <value>2</value>        </property></configuration>

 

3. Enable and disable

Format the HDFS File System Using namenode

cd hadoop-0.20.2/confhadoop namenode -format

Enable hadoop

cd hadoop-0.20.2/binsh start-all.sh

Run the JPS command to check whether the expected hadoop process is running.

Disable hadoop

cd hadoop-0.20.2/binsh stop-all.sh

 

4. Reference

Running hadoop on Ubuntu Linux (single-node cluster)

Description of parameters in hadoop configuration files

Hadoop installation Configuration

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.