Deploy Cloudera (CDH3) in Pseudo Distributed mode:
| COMMAND | DESCRIPTION |
|---|---|
| $ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" | If you are using ubuntu 10.04 LTS run this command |
| sudo apt-get install sun-java6-jdk | Install java |
| lsb_release –c | Name of the your distribution (let DISTRO)(eg: hardy or jaunty etc.) |
| vi /etc/apt/sources.list.d/cloudera.list Then type: deb http://archive.cloudera.com/debian DISTRO-cdh3 contrib deb-src http://archive.cloudera.com/debian DISTRO-cdh3 contrib | A repository enables your package manager to install cloudera replace DISTRO with the name of your distribution |
| sudo apt-get -y install curl | install curl |
| curl -s http://archive.cloudera.com/debian/archive.key | sudo apt-key add - | Add a repository key. Add the Cloudera Public GPG Key to your repository |
| sudo apt-get update | Update APT package index |
| sudo apt-get -y install hadoop-0.20-conf-pseudo | Install Hadoop in pseudo-distributed mode: A pseudo-distributed Hadoop installation is composed of one node running all five Hadoop daemons: namenode, jobtracker, secondarynamenode, datanode, and tasktracker |
| for service in /etc/init.d/hadoop-0.20-*; do sudo $service start; done | Start the Cloudera Daemons |
| dpkg -L hadoop-0.20-conf-pseudo | Viewing the files on Debian systems |
| jps | It should give output like this: 14799 NameNode 14977 SecondaryNameNode 15183 DataNode 15596 JobTracker 15897 TaskTracker |
| Congratulations Cloudrea Setup is Completed. Now lets run some examples | |
| hadoop jar /usr/lib/hadoop/hadoop-*-examples.jar pi 10 100 | run pi example |
| hadoop fs -mkdir input hadoop fs -put /etc/hadoop-0.20/conf/*.xml input hadoop-0.20 fs -ls input hadoop-0.20 jar /usr/lib/hadoop-0.20/hadoop-*-examples.jar grep input output 'dfs[a-z.]+' | run grep example |
| hadoop-0.20 fs -mkdir inputwords hadoop-0.20 fs -put /etc/hadoop-0.20/conf/*.xml inputwords hadoop-0.20 fs -ls inputwords hadoop-0.20 jar /usr/lib/hadoop-0.20/hadoop-*-examples.jar grep inputwords outputwords 'dfs[a-z.]+' | run word count example |
| http://localhost:50070/ | web based interface for name node |
| http://localhost:50030/ | web based interface for Job tracker |
| for x in /etc/init.d/hadoop-* ; do sudo $x stop ; done | Shutdown CDH2 Hadoop services |