Using an Internal Package Repository

This topic describes how to create an internal package repository and direct hosts in your Cloudera Manager deployment to use that repository. You can create a permanent or temporary repository.

After completing these steps, you can install a specific version of Cloudera Manager or install Cloudera Manager on hosts that are not connected to the Internet.

Creating a Permanent Internal Repository

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 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.

Install Apache HTTP Server

You may need to respond to some prompts to confirm you want to complete the installation.
OS Command
RHEL compatible sudo yum install httpd
SLES sudo zypper install httpd
Ubuntu sudo apt-get install httpd

Starting Apache HTTPD

OS Command
RHEL compatible sudo service httpd start
SLES sudo service apache2 start
Ubuntu sudo service apache2 start

Downloading the Tarball and Publishing Repository Files

  1. Download the tarball for your OS distribution from the repo-as-tarball archive:
    • Cloudera Manager 5: https://archive.cloudera.com/cm5/repo-as-tarball/
    • CDH 5: https://archive.cloudera.com/cdh5/repo-as-tarball/
    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:
    tar xvfz cm5.14.0-centos7.tar.gz
    sudo mv cm /var/www/html
    sudo chmod -R ugo+rX /var/www/html/cm
    After moving files and changing permissions, visit http://<web_server>/cm to verify that you see an index of files. If you do not see anything, your web server may have been configured to not show indexes.

Creating a Temporary Internal 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:
    • Cloudera Manager 5: https://archive.cloudera.com/cm5/repo-as-tarball/
    • CDH 5: https://archive.cloudera.com/cdh5/repo-as-tarball/
    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:
    cd /tmp
    tar xvfz cm5.14.0-centos7.tar.gz
    sudo chmod -R ugo+rX /tmp/cm
  3. Determine a port that your system is not listening on (for example, port 8900).
  4. Start a Python SimpleHTTPServer in the current directory:
    python -m SimpleHTTPServer 8900
    Serving HTTP on 0.0.0.0 port 8900 ...
  5. Confirm you can get to this hosted package repository by going to http://<web_server>:8900/cm in your browser. You should see links for the hosted files.

Modifying Clients to Use the Internal Repository

Having established the repository, modify the client configuration to use it:
OS Procedure
RHEL compatible Create /etc/yum.repos.d/cloudera-repo.repo files on cluster hosts with the following content, where <web_server> is the hostname of the web server:
[cloudera-repo]
name=cloudera-repo
baseurl=http://<web_server>/cm/5
enabled=1
gpgcheck=0 
SLES Use the zypper utility to update client system repo information by issuing the following command:
zypper addrepo http://<web_server>/cm <alias>
Ubuntu Create /etc/apt/sources.list.d/cloudera-repo.list files on all cluster hosts with the following content, where <web_server> is the hostname of the web server:
deb http://<web_server>/cm <codename> <components>
You can find the <codename> and <components> variables in the ./conf/distributions file in the repository.
After creating the .list file, run the following command:
sudo apt-get update