0% found this document useful (0 votes)
251 views18 pages

Cloudera Installation - 5.11.1 (Using Parcels)

The document provides instructions for installing Cloudera on a Hadoop cluster. It includes steps to: 1. Set up passwordless SSH between hosts, configure NTP, and activate necessary services. 2. Download Cloudera RPMs and create a local repository. 3. Install the Cloudera Manager server and configure MySQL as the backend database, creating required schemas.

Uploaded by

JENIFA JEYAKUMAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
251 views18 pages

Cloudera Installation - 5.11.1 (Using Parcels)

The document provides instructions for installing Cloudera on a Hadoop cluster. It includes steps to: 1. Set up passwordless SSH between hosts, configure NTP, and activate necessary services. 2. Download Cloudera RPMs and create a local repository. 3. Install the Cloudera Manager server and configure MySQL as the backend database, creating required schemas.

Uploaded by

JENIFA JEYAKUMAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Cloudera Installation

NOTE: Please follow “Setting up your Lab – Venkat” to create VMs with PostgreSQL and MySQL.

# Cloudera Installation Hosts

IP Address FQDN Hostname RAM Requirements


192.168.56.111 cmg.hadoop.com cmg 5.0GB
192.168.56.112 cn1.hadoop.com cn1 5.0GB
192.168.56.113 cn2.hadoop.com cn2 5.0GB
192.168.56.114 cn3.hadoop.com cn3 5.0GB
192.168.56.115 cn4.hadoop.com cn4 5.0GB

1. Setup Password-less SSH for hadoop cluster installation

In CM Node:

rm -rf ~/.ssh/id_rsa*
ssh-keygen -t rsa -P "" -f ~/.ssh/id_rsa
ls -ltr ~/.ssh
for i in 192.168.56.{111,112,113,114,115}; do sshpass -p welcome1 ssh-copy-id $i; done

2. Add below on any one of the master host

In CM Node:

sudo vi /etc/clustershell/groups.d/local.cfg

Add below:

cmg: 192.168.56.111
nn: 192.168.56.112 192.168.56.113
dn: 192.168.56.113 192.168.56.114 192.168.56.115
zk: 192.168.56.113 192.168.56.114 192.168.56.115
hadoop: 192.168.56.112 192.168.56.113 192.168.56.114 192.168.56.115
all: 192.168.56.111 192.168.56.112 192.168.56.113 192.168.56.114 192.168.56.115

clush -g all -b "date"

3. Configure NTPD Service.

In CM/NN Node:

clush -g all -b "sudo sed -i 's/^server /#server /g' /etc/ntp.conf"


clush -g all -x 192.168.56.111 -b "echo 'server 192.168.56.111 prefer' | sudo tee -a /etc/ntp.conf > /dev/null
2>&1"

If you don’t have internet access to your hosts:

clush -w 192.168.56.111 -b "echo 'server 127.127.1.0' | sudo tee -a /etc/ntp.conf > /dev/null 2>&1"

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

clush -w 192.168.56.111 -b "echo 'fudge 127.127.1.0 stratum 10' | sudo tee -a /etc/ntp.conf > /dev/null 2>&1"

clush -g all -b "sudo systemctl restart ntpd"


clush -g all -x 192.168.56.111 -b "/usr/sbin/ntpdate -d 192.168.56.111"
clush -g all -x 192.168.56.111 -b "/usr/sbin/ntpq -p"
clush -g all -b "date"
clush -ab "sudo systemctl restart network"

After performing all these common steps for all hosts, you can clone the VMs as explained in the first document.

4. Activate services on boot

In NN,
clush -g hadoop -b "sudo systemctl disable firewalld"
clush -g hadoop -b "sudo systemctl enable httpd"
clush -g hadoop -b "sudo systemctl enable ntpd"
clush -g hadoop -b "sudo systemctl enable ntpdate"
clush -g hadoop -b "sudo systemctl disable rpcbind"
clush -g hadoop -b "sudo systemctl disable nfs"

Remove any other repos if we have.

clush -ab "sudo mkdir -p /etc/yum.repos.d/baserepos"


clush -ab "sudo mv -f /etc/yum.repos.d/* /etc/yum.repos.d/baserepos/"
clush -ab "sudo ls /etc/yum.repos.d/"

5. Download RPMS and Create local repository in CM node

In CM Node, download Cloudera RPMS as below or Copy from Hadoop Administration Stuff 2 to /var/www/html using
WINSCP:

sudo mkdir -p /var/www/html/cloudera-cdh5.11.1


cd /var/www/html/cloudera-cdh5.11.1

sudo wget https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.11.1/RPMS/x86_64/cloudera-manager-


agent-5.11.1-1.cm5111.p0.9.el7.x86_64.rpm
sudo wget https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.11.1/RPMS/x86_64/cloudera-manager-
daemons-5.11.1-1.cm5111.p0.9.el7.x86_64.rpm
sudo wget https://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.11.1/RPMS/x86_64/cloudera-manager-
server-5.11.1-1.cm5111.p0.9.el7.x86_64.rpm

sudo wget https://archive.cloudera.com/cdh5/parcels/5.11.1/CDH-5.11.1-1.cdh5.11.1.p0.4-el7.parcel


sudo wget https://archive.cloudera.com/cdh5/parcels/5.11.1/CDH-5.11.1-1.cdh5.11.1.p0.4-el7.parcel.sha1
sudo wget https://archive.cloudera.com/cdh5/parcels/5.11.1/manifest.json

sudo wget https://archive.cloudera.com/cdh5/redhat/5/x86_64/cdh/RPM-GPG-KEY-cloudera

After downloading/copying all the RPMs to the above specified directory, do:

ls -l /var/www/html/cloudera-cdh5.11.1
sudo createrepo /var/www/html/cloudera-cdh5.11.1 -o /var/www/html/cloudera-cdh5.11.1

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

Create cloudera-cdh5.11.1.repo:

sudo vi /etc/yum.repos.d/cloudera-cdh5.11.1.repo

add below content to the file:

[cloudera-cdh5.11.1.repo]
enabled = 1
name = "My Local Repository for Cloudera Hadoop"
baseurl = http://192.168.56.111/cloudera-cdh5.11.1/
gpgcheck = 0

Install Cloudera Manager Server:

sudo yum clean all


sudo yum list cloudera-manager-server
sudo yum install -y cloudera-manager-server

7. To set MySQL as CM backend database, create DB Schemas in CM Node:

In CM Node, Create DB Schema:

Start mysql now:

sudo systemctl enable mysqld


sudo systemctl restart mysqld
sudo systemctl status mysqld

Login to mysql:

mysql -u root -pwelcome1

In mysql prompt, run below commands.

drop database amon;


drop database hmon;
drop database rman;
drop database smon;
drop database nav;
drop database navms;
drop database metastore;
drop database sentry;
drop database oozie;
drop database scm;
drop database hue;

create database amon DEFAULT CHARACTER SET utf8;


create database hmon DEFAULT CHARACTER SET utf8;
create database rman DEFAULT CHARACTER SET utf8;
create database smon DEFAULT CHARACTER SET utf8;
create database nav DEFAULT CHARACTER SET utf8;

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

create database navms DEFAULT CHARACTER SET utf8;


create database metastore DEFAULT CHARACTER SET utf8;
create database sentry DEFAULT CHARACTER SET utf8;
create database oozie DEFAULT CHARACTER SET utf8;
create database hue DEFAULT CHARACTER SET utf8;

grant all on *.* TO 'root'@'localhost' IDENTIFIED BY 'welcome1';


grant all on *.* TO 'root'@'%' IDENTIFIED BY 'welcome1';
create user 'amon'@'%' identified by 'amon123';
grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'amon123';
create user 'hmon'@'%' identified by 'hmon123';
grant all on hmon.* TO 'hmon'@'%' IDENTIFIED BY 'hmon123';
create user 'rman'@'%' identified by 'rman123';
grant all on rman.* TO 'rman'@'%' IDENTIFIED BY 'rman123';
create user 'smon'@'%' identified by 'smon123';
grant all on smon.* TO 'smon'@'%' IDENTIFIED BY 'smon123';
create user 'nav'@'%' identified by 'nav123';
grant all on nav.* TO 'nav'@'%' IDENTIFIED BY 'nav123';
create user 'navms'@'%' identified by 'navms123';
grant all on navms.* TO 'navms'@'%' IDENTIFIED BY 'navms123';
create user 'hive'@'%' identified by 'hive123';
grant all on hive.* TO 'metastore'@'%' IDENTIFIED BY 'hive123';
create user 'sentry'@'%' identified by 'sentry123';
grant all on sentry.* TO 'sentry'@'%' IDENTIFIED BY 'sentry123';
create user 'oozie'@'%' identified by 'oozie123';
grant all on oozie.* TO 'oozie'@'%' IDENTIFIED BY 'oozie123';
create user 'hue'@'%' identified by 'hue123';
grant all on hue.* TO 'hue'@'%' IDENTIFIED BY 'hue123';
flush privileges;

Quit from mysql prompt.

8. Create schema for SCM:

Login to the node (usually CM Node) where your MYSQL is installed.

cd /usr/share/cmf/schema/
sudo ./scm_prepare_database.sh mysql -h cmg.hadoop.com -u root -pwelcome1 --scm-host cmg.hadoop.com
scm scm scm123

If you are facing any issues here, please login to mysql and run below commands:

mysql -uroot -pwelcome1


grant all on *.* TO 'root'@'localhost' IDENTIFIED BY 'welcome1';
grant all on *.* TO 'root'@'%' IDENTIFIED BY 'welcome1';

This will create a file as below

sudo cat /etc/cloudera-scm-server/db.properties


sudo cat /etc/cloudera-scm-server/db.mgmt.properties

After successfully creating SCM schema, login to mysql and create below DBs for Cloudera installation. Delete existing

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

properties in /etc/cloudera-scm-server/db.mgmt.properties and place new values as below.

sudo vi /etc/cloudera-scm-server/db.mgmt.properties

com.cloudera.cmf.ACTIVITYMONITOR.db.type=mysql
com.cloudera.cmf.ACTIVITYMONITOR.db.host=cmg.hadoop.com:3306
com.cloudera.cmf.ACTIVITYMONITOR.db.name=amon
com.cloudera.cmf.ACTIVITYMONITOR.db.user=amon
com.cloudera.cmf.ACTIVITYMONITOR.db.password=amon123
com.cloudera.cmf.REPORTSMANAGER.db.type=mysql
com.cloudera.cmf.REPORTSMANAGER.db.host=cmg.hadoop.com:3306
com.cloudera.cmf.REPORTSMANAGER.db.name=rman
com.cloudera.cmf.REPORTSMANAGER.db.user=rman
com.cloudera.cmf.REPORTSMANAGER.db.password=rman123
com.cloudera.cmf.NAVIGATOR.db.type=mysql
com.cloudera.cmf.NAVIGATOR.db.host=cmg.hadoop.com:3306
com.cloudera.cmf.NAVIGATOR.db.name=nav
com.cloudera.cmf.NAVIGATOR.db.user=nav
com.cloudera.cmf.NAVIGATOR.db.password=nav123
com.cloudera.cmf.NAVIGATORMETASERVER.db.type=mysql
com.cloudera.cmf.NAVIGATORMETASERVER.db.host=cmg.hadoop.com:3306
com.cloudera.cmf.NAVIGATORMETASERVER.db.name=navms
com.cloudera.cmf.NAVIGATORMETASERVER.db.user=navms
com.cloudera.cmf.NAVIGATORMETASERVER.db.password=navms123

After this, restart cloudera-scm-server

sudo systemctl enable cloudera-scm-server


sudo systemctl restart cloudera-scm-server
sudo systemctl status cloudera-scm-server

sudo telnet cmg.hadoop.com 7180

This will start CM with MySQL. To see the logs,

sudo ls -ltr /var/log/cloudera-manager-installer


sudo tailf /var/log/cloudera-scm-server/cloudera-scm-server.log

Open Cloudera Manager in browser by typing http://192.168.56.111:7180


Enter user and password as admin and admin

9. Start installing Cloudera:

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

Click on More Options and select the Parcel Location.

Click on “More Options”

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

Delete all Parcel Repository Settings and add Custom Parcels Repository Location:

http://192.168.56.111/cloudera-cdh5.11.1/

Custom GPG Key URL:

http://192.168.56.111/cloudera-cdh5.11.1/RPM-GPG-KEY-cloudera

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

10. If you see any error in Host Inspector, run below.

sudo /usr/sbin/sysctl vm.swappiness=10


clush -g hadoop -b "echo never | sudo tee /sys/kernel/mm/transparent_hugepage/defrag"
clush -g hadoop -b "echo never | sudo tee /sys/kernel/mm/transparent_hugepage/enabled"

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

11. Enable NameNode High Availability

12. Enable Resource Manager High Availability

13. Validate Storage Layer

hdfs dfs -ls /

In any one of the NameNodes:

sudo -u hdfs hdfs getconf -confKey dfs.ha.namenodes.mycluster

Check the status based on previous command.

sudo -u hdfs hdfs haadmin -getServiceState namenode36


sudo -u hdfs hdfs haadmin -getServiceState namenode41

sudo -u hdfs hdfs haadmin -failover namenode41 namenode36

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

sudo -u hdfs hdfs haadmin -failover namenode36 namenode41

14. Validate Processing Layer

In any one of the RM Nodes:

sudo -u hdfs hdfs getconf -confKey yarn.resourcemanager.ha.rm-ids

Check the status based on previous command.

sudo -u yarn yarn rmadmin -getServiceState rm34


sudo -u yarn yarn rmadmin -getServiceState rm47

sudo -u yarn yarn rmadmin -failover rm34 rm47

15. Enabling Fair Scheduler in Cloudera:

16. Enable Kerberos

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

Perform Manual Checkpoint:

sudo -u hdfs hdfs dfsadmin -safemode enter


sudo -u hdfs hdfs dfsadmin -saveNamespace
sudo -u hdfs hdfs dfsadmin -safemode leave

By: Venkata Narasimha Rao B, Contact: +91 9342707000


Cloudera Installation

For any questions, email to [email protected]

By: Venkata Narasimha Rao B, Contact: +91 9342707000

You might also like