In this article we will be discussing about Installing Cloudera (CDH 5 ) in Centos Linux.
Ways To Install CDH 5 :-
We can install CDH 5 in following ways:
- Automated ways: Using Cloudera Manager, This is recommended method to install cloudera.
- Manual ways. Using Cloudera repository.
Here we are going to install CDH 5 using manual method ( using Cloudera repository).
Visit this link to download repository of cloudera:
Download and install CDH 5 repository for your Centos System-
Here i have downloaded it for centos 64 bit.
Move to Downloads folder, and move cloudera repository to home directory.
Return back to home directory and Install the repository for centos –
1 |
sudo yum --nogpgcheck localinstall cloudera-cdh-5-0.x86_64.rpm |
Now Add a Repository Key which enables you to verify that you are downloading genuine packages. [ Optional ]
1 |
sudo rpm --import http://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera |
Now Install CDH 5 with YARN:
Note: Before installing YARN daemons clean yum repository.
1 |
sudo yum clean all |
Then install YARN –
1 |
sudo yum install hadoop-yarn-resourcemanager |
Install hadoop-hdfs-namenode :
1 |
sudo yum install hadoop-hdfs-namenode |
Secondary NameNode Installation:
1 |
sudo yum install hadoop-hdfs-secondarynamenode |
Install data-nodes and other cluster hosts:
1 |
sudo yum install hadoop-yarn-nodemanager hadoop-hdfs-datanode hadoop-mapreduce |
Install one history server and yarn-proxyserver :
1 |
sudo yum install hadoop-mapreduce-historyserver hadoop-yarn-proxyserver |
Add below property into core-site.xml between configuration tag:
1 |
vi /etc/hadoop/conf/core-site.xml |
<property>
<name>fs.defaultFS</name>
<value>hdfs://acd.acadgild.net:8020</value>
</property>
Add below property into hdfs-site.xml :
1 |
vi /etc/hadoop/conf/core-site.xml |
<property>
<name>dfs.namenode.name.dir</name>
<value>file:///var/lib/hadoop-hdfs/cache/hdfs/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:///data/1/dfs/dn,file:///data/2/dfs/dn,file:///data/3/dfs/dn,file:///data/4/dfs/dn</value>
</property>
Make Namenode and Datanode directory and set permission to them –
Run following command one by one:-
-
1sudo mkdir -p /data/1/dfs/nn /nfsmount/dfs/nn
-
1sudo mkdir -p /data/1/dfs/dn /data/2/dfs/dn /data/3/dfs/dn /data/4/dfs/dn
-
1sudo chown -R hdfs:hdfs /data/1/dfs/nn /nfsmount/dfs/nn /data/1/dfs/dn /data/2/dfs/dn /data/3/dfs/dn /data/4/dfs/dn
-
1sudo chmod 700 /data/1/dfs/nn /nfsmount/dfs/nn
-
1sudo chmod go-rx /data/1/dfs/nn /nfsmount/dfs/nn
-
1Reboot
Now type jps to see All running daemons
1 |
jps |
All set, Now Cloudera Cluster has been configured and will start Automatically after every reboot.
Keep visiting our blogs :- https://acadgild.com/blog/
Leave a Reply