Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Installing Hadoop on
Ubuntu 16
Install Java
java -version
If I see the output below, then I dont have java installed, follow
instructions next slide
10/24/2016
Install Java
Type:
sudo
10/24/2016
Do I have java?
java
version
10/24/2016
Install Openssh
sudo
ssh-keygen
-t rsa
enter
10/24/2016
SSH Keys
Now we will copy the key to the user and host, in my case my user is
hadoop and host is hadoopdev
ssh-copy-id hadoop@hadoopdev
10/24/2016
Type in the terminal the following command to create new folder within
my home linux folder, in this case/home/Hadoop/:
mkdir hadoop_install
cd hadoop_install
wget http://
www-eu.apache.org/dist/hadoop/common/hadoop-2.7.3/hadoop-2.7.3.tar
.gz
10/24/2016
10/24/2016
10
Now you will see 2 folders, the new directory is called hadoop-2.7.3:
10/24/2016
11
Setup bashrc
Edit bashrc
Type:
10/24/2016
12
Setup ~/.bashrc
Pls note on previous slide the java path is displayed, need to point
bashrc to the actual java path
export HADOOP_INSTALL=/home/hadoop/hadoop_install
export PATH=$PATH:$HADOOP_INSTALL/bin
export PATH=$PATH:$HADOOP_INSTALL/sbin
10/24/2016
13
source
~/.basrch
Type the command below (if at this point you see an output like
this youre doing well)
hadoop
version
10/24/2016
14
15
Go to the path:
/home/hadoop/hadoop_install/hadoop-2.7.3/etc/hadoop
10/24/2016
16
Modifying hadoop-env.sh
10/24/2016
17
Modify core-site.xml
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/hadoop/hadoop_install/tmp</value>
<description>A base for other temporary directories.</description>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:54310</value>
<description>The name of the default file system.</description>
</property>
</configuration>
10/24/2016
18
Modify mapred-site.xml
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:54311</value>
<description>The host and port that the MapReduce job tracker runs at. </description>
</property>
10/24/2016
19
Modify hdfs-site.xml
We need to crate 2 new folders which will contain name node and data
node:
10/24/2016
20
Modify hdfs-site.xml
Add the code below in the file hdfs-site.xml, the paths for namnode and datanode are the 2 new
folders you just created on previous slide.
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:///home/hadoop/hadoop_install/namenode</value>
</property>
<property>
<name>dfs.data.node.name.dir</name>
<value>file:///home/hadoop/hadoop_install/datanode</value>
</property>
</configuration>
#hdfs-site.xml is located on the path: /home/hadoop/hadoop_install/hadoop-2.7.3/etc/hadoop
Enrique Davila Big Data Instructor
enrique.davila@gmail.com
10/24/2016
21
10/24/2016
22
10/24/2016
23
startall.sh
jps,
10/24/2016
24
Stop Cluster
We run stop-all.sh
10/24/2016
25
10/24/2016
26
Applies for:
Ubuntu 16
Hadoop 2.7.3
Virtual Machine:
2 Processors
2 Gb Ram
10/24/2016
27
Contact name:
Enrique.davila@Gmail.com
10/24/2016