sudo apt-get upgrade sudo apt-get update 8.Setup proper hostnames on all machines using 9. Install openJDK using the following command /* $ sudo apt-get install openjdk-7-jdk user@ubuntu:~$ sudo apt-get install openjdk-6-jdk */ user@ubuntu:~$ sudo apt-get install openjdk-6-jdk 10. Verify the java version installed user@ubuntu:~$ java -version java version "1.6.0_31" OpenJDK Runtime Environment (IcedTea6 1.13.3) (6b31-1.13.3-1ubuntu1~0.12.04.2) OpenJDK Client VM (build 23.25-b01, mixed mode, sharing) user@ubuntu:~$ 11. Create a symlink from openjdk default name to jdk using the following commands : $ cd /usr/lib/jvm $ ln -s java-6-openjdk-6-jdk jdk 12. Install ssh server: $ sudo apt-get install openssh-client $ sudo apt-get install openssh-server 13. Add hadoop group and user hduser /* $ sudo addgroup hadoop $ usermod -a -G hadoop hduser */ $sudo addgroup hadoop $sudo adduser ingroup hadoop hduser To verify that hduser has been added to the group hadoop use the command: $ groups hduser which will display the groups hduser is in. 14. 14. Configure SSH: su - hduser password:hadoop $ ssh-keygen -t rsa -P '' ... Your identification has been saved in /home/hduser/.ssh/id_rsa Your public key has been saved in /home/hduser/.ssh/id_rsa.pub ... $ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys $ ssh localhost hduser@ubuntu:~$ ssh-keygen -t rsa -P "" Generating public/private rsa key pair. Enter file in which to save the key (/home/hduser/.ssh/id_rsa): Created directory '/home/hduser/.ssh'. Your identification has been saved in /home/hduser/.ssh/id_rsa. Your public key has been saved in /home/hduser/.ssh/id_rsa.pub. The key fingerprint is: 1f:32:56:89:97:4f:a3:ae:6b:fc:af:07:c6:15:e3:c9 hduser@ubuntu The key's randomart image is: +--[ RSA 2048]----+ | | | . oo | | . =oo+ | | o +E. | | S.o.. | | . =+. | | . .o. | | o. . | | .ooo+. | +-----------------+ hduser@ubuntu:~$ hduser@ubuntu:~$ cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys hduser@ubuntu:~$ ssh localhost The authenticity of host 'localhost (127.0.0.1)' can't be established. ECDSA key fingerprint is 11:5c:b2:18:f7:13:6e:86:20:e3:58:76:cc:a2:f5:6c. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts. Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686) * Documentation: https://help.ubuntu.com/ 522 packages can be updated. 16. Add the following line to the end of the file: # disable ipv6 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 To make sure that IPV6 is disabled, you can run the following command: $cat /proc/sys/net/ipv6/conf/all/disable_ipv6 Save and close the file. Then restart the system and login with hduser again. 17. Download Hadoop - 1.2.1 from the following link to your Downbashloads folder 18. Extract Hadoop and move it to /usr/local and make this user own it: $ cd Downloads $ sudo tar vxzf hadoop-1.2.1.tar.gz -C /usr/local $ cd /usr/local $ sudo mv hadoop-1.2.1 hadoop $ sudo chown -R hduser:hadoop hadoop 19. Open the .bashrc file to edit it: $ cd ~ $ gksudo gedit .bashrc 20. Add the following lines to the end of the file: /* #Hadoop variables export JAVA_HOME=/usr/lib/jvm/jdk/ 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 #end of paste */ /* Edit .bashrc # Set Hadoop-related environment variables export HADOOP_HOME=/usr/local/hadoop # Set JAVA_HOME (we will also configure JAVA_HOME directly for Hadoop later on) export JAVA_HOME=/usr/lib/jvm/java-6-sun # Add Hadoop bin/ directory to PATH export PATH=$PATH:$HADOOP_HOME/bin */ #Hadoop variables export JAVA_HOME=/usr/lib/jvm/jdk/ 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_HOME=$HADOOP_INSTALL export YARN_HOME=$HADOOP_INSTALL Save and close the file commands to open Specific Ports iptables -A INPUT -p tcp --dport 22 -j ACCEPT