Professional Documents
Culture Documents
Note : In this document, steps for installing Hadoop-2.7.7 on ubuntu 14.04 (64 bit) is described.
Steps :
1. Install Java
2. Disable ipv6
3. Add a dedicated hadoop user
4. Install ssh
5. Give hduser sudo permission
6. Set up ssh certificates
7. Install hadoop
8. Configure hadoop
• .bashrc
• Hadoop env.sh
• core-site.xml
• mapred-site.xml
• hdfs-site.xml
9. Restart the ubuntu
10. Format hadoop file system
11. Start hadoop
12. Testing whether it is running or not
13. Stopping Hadoop
update-java-alternatives -l
#disable ipv6
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
which ssh
which sshd
su hduser
ssh localhost
su hduser
wget https://archive.apache.org/dist/hadoop/core/hadoop-2.7.7/hadoop-2.7.7.tar.gz
tar xvzf hadoop-2.7.7.tar.gz
cd hadoop-2.7.7
sudo mv * /usr/local/hadoop
cd ..
vim ~/.bashrc
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
export HADOOP_INSTALL=/usr/local/hadoop
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
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_INSTALL/lib"
vim /usr/local/hadoop/etc/hadoop/hadoop-env.sh
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
• core-site.xml
vim /usr/local/hadoop/etc/hadoop/core-site.xml
<property>
<name>hadoop.tmp.dir</name>
<value>/app/hadoop/tmp</value>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:54310</value>
<description>
</description>
</property>
</configuration>
• mapred-site.xml
cp /usr/local/hadoop/etc/hadoop/mapred-site.xml.template
/usr/local/hadoop/etc/hadoop/mapred-site.xml
vim /usr/local/hadoop/etc/hadoop/mapred-site.xml
<configuration> (................. add below text under existing configuration)
<property>
<name>mapred.job.tracker</name>
<value>localhost:54311</value>
<description>The host and port that the MapReduce job tracker runs
</description>
</property>
</configuration>
• hdfs-site.xml
vim /usr/local/hadoop/etc/hadoop/hdfs-site.xml
<property>
<name>dfs.replication</name>
<value>1</value>
<description>
The actual number of replication can be specified when the file is created.
</description>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop_store/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop_store/hdfs/datanode</value>
</property>
</configuration>
su hduser
cd /usr/local/hadoop/sbin
start-all.sh
jps
http://localhost:50070
stop-all.sh
jps