"Basic Hadoop Tutorial" 2, Hadoop single-machine mode construction

Source: Internet
Author: User
Tags gz file xsl hadoop fs

Single-machine mode requires minimal system resources, and in this installation mode, Hadoop's Core-site.xml, Mapred-site.xml, and hdfs-site.xml configuration files are empty. By default, the official hadoop-1.2.1.tar.gz file uses the standalone installation mode by default. When the configuration file is empty, Hadoop runs completely locally, does not interact with other nodes, does not use the Hadoop file system, and does not load any daemons, which are primarily used to develop the logic of debugging MapReduce applications and not interact with any daemons to avoid complexity. To telnet to the K-master server with a Hadoop user, install the Hadoop process on the K-master server as follows.

Development environment

Hardware environment: Centos 6.5 server 4 (one for master node, three for slave node)

Software Environment: Java 1.7.0_45, hadoop-1.2.1

1. Install Hadoop

1) Telnet to the K-master server, download the hadoop-1.2.1.tar.gz, and copy it to the/home/hadoop/directory of the K-master server.

2) Unzip the hadoop-1.2.1.tar.gz

[[email protected] ~]$ su hadoop[[email protected] ~]$ cd /usr[[email protected] usr]$ sudo tar –zxvf  /home/hadoop/hadoop-1.2.1.tar.gz

3) Renaming Hadoop

[[email protected] usr]$ sudo mv hadoop-1.2.1/ hadoop/

4) Assign the folder "Hadoop" Read permission to the Hadoop user

It's critical to one step to make it easy for Hadoop users to have read and write access to the folder's files, or you won't be able to create files and write log information in that folder after subsequent Hadoop starts.

[[email protected] usr]$ sudo chown -R hadoop:hadoop /usr/hadoop

5) Remove the installation package

[[email protected] ~]$ rm–rf/home/hadoop/hadoop-1.2.1.tar.gz #删除 "hadoop-1.2.1.tar.gz" installation package

2. Configure Environment variables

1) Configuration/etc/profile

2) Make the configuration file effective immediately at the current terminal

[[email protected] ~] $source /etc/profile
3. Start Hadoop

1) Start Hadoop with the start-al.sh command

[[email protected] ~] $start-all.sh

2) Use JPS to see if the boot was successful

[[email protected] ~] $jpsjps

Because it is a stand-alone mode, Namenode and Jobtracker are not started, how to know if the installation is successful?

3) View HDFs system

[[email protected] ~] $ hadoop fs -ls /

View the Hadoop HDFs file management system through Hadoop fs-ls/commands, as shown in the Linux file system directory. The results shown above indicate that the Hadoop standalone installation was successful. So far, we have not made any changes to the Hadoop configuration file, which is all the default configuration, that is, the configuration file is all empty, as shown below.

[[email protected] hadoop] vi conf/core-site.xml<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Put site-specific property overrides in this file. --><configuration></configuration>
You may like

Hadoop's server Infrastructure setup

Hadoop stand-alone mode Setup

Hadoop's pseudo-distributed environment building

Fully distributed environment for Hadoop construction

"Basic Hadoop Tutorial" 2, Hadoop single-machine mode construction

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.