Creating and Using a Package Repository for Cloudera Manager
Install a Web Server
The repository is typically hosted using HTTP on a host inside your network. If you already have a web server in your organization, you can move the repository directory, which will include both the RPMs and the repodata/ subdirectory, to some a location hosted by the web server. An easy web server to install is the Apache HTTPD. If you are able to use an existing web server, then note the URL and skip to Download Tarball and Publish Repository Files.
Download Tarball and Publish Repository Files
- Download the tarball for your OS distribution from the repo as tarball archive.
- Unpack the tarball, move the files to the web server directory, and modify file permissions. For example, you might use the following commands:
[root@localhost tmp]$ gunzip cm5.0.0-centos6.tar.gz [root@localhost tmp]$ tar xvf cm5.0.0-centos6.tar [root@localhost tmp]$ mv cm /var/www/html [root@localhost tmp]$ chmod -R ugo+rX /var/www/html/cm
After moving files and changing permissions, visit http://hostname:port/cm to verify that you see an index of files. Apache may have been configured to not show indexes, which is also acceptable.
Create a Temporary Local Repository
Alternatively you can quickly create a temporary local repository to deploy a package once. It is convenient to perform this on the same host that runs Cloudera Manager, or a gateway role. In this example, python SimpleHTTPServer is used from a directory of your choosing.
- Download the tarball for your OS distribution from the repo as tarball archive.
- Unpack the tarball and modify file permissions. For example, you might use the following commands:
[root@localhost tmp]$ gunzip cm5.0.0-centos6.tar.gz [root@localhost tmp]$ tar xvf cm5.0.0-centos6.tar [root@localhost tmp]$ chmod -R ugo+rX /tmp/cm
- Determine a port that your system is not listening on (for example, port 8900).
- Change to the directory containing the files.
$ cd /tmp/cm
- Start a python SimpleHTTPServer to host these two files:
$ python -m SimpleHTTPServer 8900 Serving HTTP on 0.0.0.0 port 8900 ...
- Confirm you can get to this hosted package directory by going to http://server:8900/cm in your browser. You should see links for the hosted files.
Modify Clients to Find Repository
OS | Command |
---|---|
RHEL | Create files on client systems with the following information and format, where hostname is the
name of the web server:
[myrepo] name=myrepo baseurl=http://hostname/cm/5 enabled=1 gpgcheck=0See man yum.conf for more details. Put that file into /etc/yum.repos.d/myrepo.repo on all of your hosts to enable them to find the packages that you are hosting. |
SLES | Use the zypper utility to update client system repo information by issuing the following command:
$ zypper addrepo http://hostname/cm alias |
Ubuntu or Debian | Add a new list file to /etc/apt/sources.list.d/ on client systems. For
example, you might create the file /etc/apt/sources.list.d/my-private-cloudera-repo.list. In that file, create an entry to your newly created repository. For example:
$ cat /etc/apt/sources.list.d/my-private-cloudera-repo.list deb http://hostname/cm clouderaAfter adding your .list file, ensure apt-get uses the latest information by issuing the following command: $ sudo apt-get update |
After completing these steps, you have established the environment necessary to install a previous version of Cloudera Manager or install Cloudera Manager to hosts that are not connected to the Internet. Proceed with the installation process, being sure to target the newly created repository with your package management tool.