This section explains how to set up a local yum repository to install CDH on the machines in your cluster. There are a number of reasons you might want to do this, for example:
- Server in your cluster don’t have access to internet. You can still use YUM to do an installation on those machines by creating a local YUM repository.
- To make sure that each node will have the same version of software installed.
- Local repository is more efficient.
We need internet connection to download the repo/packages.
Set up Local Repo:
Create local web publishing directory. And Install web server such as Apache/http on the machine that host the RPM and start the http server.
1 2 3 4 5 |
[root@cm ~]# mkdir -p /var/www/html/yum/cm [root@cm ~]# yum install httpd [root@cm ~]# service httpd start Redirecting to /bin/systemctl start httpd.service [root@cm ~]# service httpd status |
Install createrepo and yum-utils rpms.
1 |
[root@cm ~]# yum install yum-utils createrepo |
Download the CM tar file.
1 2 |
[root@cm ~]# wget http://archive.cloudera.com/cm5/repo-as-tarball/5.12.0/cm5.12.0-centos7.tar.gz # Download the file on your PC and move it to machine that host RPM.http://archive.cloudera.com/cm5/repo-as-tarball/5.12.0/ |
Move the tar file to web directory and unpack it.
1 2 |
[root@cm conf]# mv cm5.12.0-centos7.tar.gz /var/www/html/yum [root@cm html]# tar -xvf cm5.12.0-centos7.tar.gz |
Now create the yum repository.
1 2 3 4 5 6 7 8 |
[root@cm cm]# createrepo /var/www/html/yum/cm/5.12.0 Spawning worker 0 with 7 pkgs Workers Finished Saving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs Sqlite DBs complete |
Ensure that you can access the URL.
http://192.168.1.83/yum/cm/
Now create the cm.repo file and list the available repo.
1 2 3 4 5 6 7 8 |
[root@cm html]# cd /etc/yum.repos.d/ [root@cm yum.repos.d]# vi cm.repo [cm] name=cm baseurl=http://192.168.1.83/yum/cm/5 enabled=1 gpgcheck=0 [root@cm yum.repos.d]# yum repolist |
Set up Parcels:
Create the parcel directory.
1 2 |
[root@cm ~]# mkdir -p /var/www/html/parcels [root@cm ~]# cd /var/www/html/parcel |
Now download the required parcels.
1 2 3 4 5 |
[root@cm parcels]# mkdir /var/www/html/parcels/ [root@cm parcels]# cd /var/www/html/parcels/ [root@cm parcels]# wget https://archive.cloudera.com/cdh5/parcels/5.14.0/CDH-5.14.0-1.cdh5.14.0.p0.24-el5.parcel [root@cm parcels]# wget https://archive.cloudera.com/cdh5/parcels/5.14.0/manifest.json [root@cm parcels]# wget https://archive.cloudera.com/cdh5/parcels/5.14.0/CDH-5.14.0-1.cdh5.14.0.p0.24-el5.parcel.sha1 |
Check URL for parcels.You can use this URL in ClouderaManager.
192.168.1.83/parcels/
Install CM using local repository:
Download installer for CM and change the permissions. And run the CM installer with option ” –skip_repo_package=1 to install cloudera manager from the local repo.
1 2 3 |
[root@cm ~]# wget http://archive.cloudera.com/cm5/installer/5.12.0/cloudera-manager-installer.bin [root@cm ~]# chmod u+x cloudera-manager-installer.bin [root@cm ~]# sudo ./cloudera-manager-installer.bin --skip_repo_package=1 |
You’ll get the following window. Not recommended for production.
Accept the Licence.
Accept Oracle Binaries Licence.
JDK/ClouderaManager installation is in progress.
Installation complete.
Now open URL.
http://cm:7180/cmf/login or http://192.168.1.83:7180/cmf/login
Login to the page with admin/admin. Accept the licence and accept cloudera Enterprise Data hub.
Next part is cluster set up and will explain in future blogs.
Thanks
Mandy
Leave a Reply