Professional Documents
Culture Documents
Dear viewers,
This post will help you to single node setup of hadoop 2.6.0 on Fedora or similar systems.
Steps:
#Hadoop variables
# Modify JAVA_HOME and HADOOP_INSTALL as per your requirements
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.3.x86_64
export HADOOP_INSTALL=/usr/local/hadoop-2.6.0
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL
#end of Hadoop variable declaration
export JAVA_HOME=${JAVA_HOME}
and replace it with
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.3.x86_64
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/usr/local/hadoop-2.6.0/tmp</value>
</property>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
C. Open file yarn-site.xml and paste following under <configuration> </configuration>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>localhost:9025</value>
</property>
D. Set up default directories and for namenode and datanode and then edit hdfs-site.xml
fileNote that these directories must be in the users home directory, incase of fedora, otherwise the
combined space in HDFS doesn't show full access to provided storage to the system.
[pavan@Pavan ~]$ cd ~
[pavan@Pavan ~]$ pwd
/home/pavan
[pavan@Pavan ~]$ mkdir -p hadoopdata/hdfs/namenode
[pavan@Pavan ~]$ mkdir -p hadoopdata/hdfs/datanode
[pavan@Pavan ~]$ vi /usr/local/hadoop-2.6.0/etc/hadoop/hdfs-site.xml
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
8. Format namenode
# As this is fresh installation, formatting name node will not harm your data, because it do not
contains any data. Formatting namenode will erase hadoop data. So just be sure when you format
hdfs next time.
10. Hadoop configuration is done. To check the java process status run following
Congratulation !!! you have successfully setup hadoop 2.6.0 single node cluster.
Thanks.
References:
1. http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/
2. https://accretioninfinity.wordpress.com/2013/06/11/installing-hadoop-for-fedora-oracle-
linuxsingle-node-cluster/
mv hadoop-2.6.0 /usr/local
mkdir -p /usr/local/hadoop