Professional Documents
Culture Documents
Hadoop Installation
Hadoop Installation
#!/usr/bin/env bash
sudo apt-get update
clear
echo "--------------UPDATED--------"
sudo apt-get install default-jdk
clear
java -version
echo "-------------JAVA INSTALLED----"
clear
sudo addgroup hadoop
echo "============HADOOP GROUP ADDED========"
clear
sudo adduser --ingroup hadoop hduser
echo "===========HDUSER USER ADDED=========="
clear
sudo apt-get install ssh
which ssh
which sshd
echo "=============SSH INSTALLED=========="
clear
su hduser
echo "==============INSIDE HDUSER=========="
ssh-keygen -t rsa -P ""
echo "===============KEY GENERATED SUCCESSFULLY=============="
cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
ssh localhost
echo "===================DOWNLOADING HADOOP================"
wget http://www-eu.apache.org/dist/hadoop/common/hadoop-2.8.1/hadoop-2.8.1.tar.gz
clear
echo "==================DOWNLOADED SUCCESSFULLY=============="
clear
echo "====================UNtar================"
tar -xvzf hadoop-2.8.1.tar.gz
clear
echo "=====untar successful=============="
cd /
exit
exit
sudo adduser hduser sudo
su hduser
sudo mkdir /usr/local/hadoop
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:</value>
<description>The name of the default file system. A URI whose scheme and authority
determine the FileSystem implementation. The
uri's scheme determines the config property (fs.SCHEME.impl) naming
the FileSystem implementation class. The uri's authority is used to
determine the host, port, etc. for a filesystem.</description>
</property>
</configuration>
EOF
sudo cp /usr/local/hadoop/etc/hadoop/mapred-site.xml.template
/usr/local/hadoop/etc/hadoop/mapred-site.xml
cat<<EOF >>/usr/local/hadoop/etc/hadoop/mapred-site.xml
<property>
<name>mapred.job.tracker</name>
<value>localhost:</value>
<description>The host and port that the MapReduce job tracker runs
at. If "local", then jobs are run in-process as a single map
and reduce task.
</description>
</property>
EOF
jps
start-dfs.sh
jps
start-yarn.sh
jps