Creating an internal yum repository for RHEL packages
Learn more about how to create an internal yum internal repository using the Apache HTTP server.
Setting up a Web server
- Install Apache HTTP
sudo yum install httpd
- Start Apache HTTP
sudo systemctl start httpd
Downloading and publishing the package repository for the CDH client
- Download the package repository of CDH client that you want to install.
Download the files for a CDP Private Cloud Base release:
- Run the following command to create a local repository directory for the Cloudera
sudo mkdir -p /var/www/html/cloudera-repos/cdh-client
Run the following command to modify the file permission that allows you to download the files under the local repository directory:
sudo chmod -R ugo+rX /var/www/html/cloudera-repos/cdh-client
- Copy the files to the yum directory.
- Run the following command to create a local repository directory for the Cloudera package repository:
- Visit the repository URL http://<web_server>/cloudera-repos/ in your browser and verify that the files you downloaded are present.
Creating a temporary internal repository
Download the repository. You need to follow the instructions in "Downloading and publishing the package repository for the CDH Client".
Determine a port that your system is not listening on. This example uses port 8900.
- Start a Python SimpleHTTPServer in the /var/www/html
cd /var/www/html python -m SimpleHTTPServer 8900
Serving HTTP on 0.0.0.0 port 8900 ...
Visit the repository URL http://<web_server>:8900/cloudera-repos/ in your browser and verify the files you downloaded are present.
Configuring hosts to use the internal repository
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:
Use the zypper utility to update client system repository information by issuing the following command:
zypper addrepo http://<web_server>/<cdh-client>
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>/<cdh-client><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: