This is the documentation for Cloudera Enterprise 5.8.x. Documentation for other versions is available at Cloudera Documentation.

Creating and Using a Package Repository for Cloudera Manager

This topic describes how to create a remote package repository and direct hosts in your Cloudera Manager deployment to use that repository. There are two options for publishing the repository: Once you have created a repository, go to Modifying Clients to Find the Repository.

After completing these steps, you have established the environment required 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.

Creating a Permanent Remote Repository

Installing 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 Downloading the Tarball and Publishing Repository Files.

Installing Apache HTTPD

You may need to respond to some prompts to confirm you want to complete the installation.
OS Command
RHEL
[root@localhost yum.repos.d]$ yum install httpd
SLES
[root@localhost zypp]$ zypper install httpd
Ubuntu or Debian
[root@localhost apt]$ apt-get install httpd

Starting Apache HTTPD

OS Command
RHEL
[root@localhost tmp]$  service httpd start
Starting httpd:                                            [  OK  ]
SLES
[root@localhost tmp]$ service apache2 start
Starting httpd:                                            [  OK  ]
Ubuntu or Debian
[root@localhost tmp]$ service apache2 start
Starting httpd:                                            [  OK  ]

Downloading the Tarball and Publishing Repository Files

  1. Download the tarball for your OS distribution from the repo as tarball archive.
    For Cloudera Navigator data encryption components, go to the download page for each component, select your OS version, and click Download:
  2. 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]$ tar xvfz cm5.0.0-centos6.tar.gz
    [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.

Creating a Temporary Remote Repository

You can quickly create a temporary remote 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.

  1. Download the tarball for your OS distribution from the repo as tarball archive.
    For Cloudera Navigator data encryption components, go to the download page for each component, select your OS version, and click Download:
  2. Unpack the tarball and modify file permissions. For example, you might use the following commands:
    [root@localhost tmp]$ tar xvfz cm5.0.0-centos6.tar.gz
    [root@localhost tmp]$ chmod -R ugo+rX /tmp/cm
  3. Determine a port that your system is not listening on (for example, port 8900).
  4. Change to the directory containing the files.
    $ cd /tmp/cm
  5. Start a python SimpleHTTPServer to host these two files:
    $ python -m SimpleHTTPServer 8900
    Serving HTTP on 0.0.0.0 port 8900 ...
  6. 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.

Modifying Clients to Find the Repository

Having established the repository, modify the clients so they find the 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=0 
See 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 codename components
You can find the codename and component variables in the ./conf/distributions file in the repository.
After adding your .list file, ensure apt-get uses the latest information by issuing the following command:
$ sudo apt-get update
Page generated July 8, 2016.