• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

HDPCA Exam Objective – Configure a local HDP repository

by admin

Note: This is post is part of the HDPCA exam objective series

To be able to install HDP in enterprise environments we have to configure the local repositories. There are 2 repositories that are required to get an enterprise Hadoop cluster up and running, namely:
1. Ambari Repositories
2. HDP Stack Repositories

Configuring local repositories for Ambari and HDP Stack

1. Create a directory to store the ambari and HDP stack repository in the web server directory used to store the repositories (e.g. /var/www/html) on your local repository server.

# mkdir /var/www/html/ambari
# mkdir /var/www/html/hdp

2. Synchronize the repository contents to your repository server:

# reposync -r Updates-ambari-[version]
# reposync -r HDP-[latest.version]
# reposync -r HDP-UTILS-[version]

3. Generate the repository metadata.

# createrepo /var/www/ambari/Updates-ambari-[version]
# createrepo /var/www/hdp/HDP-[latest.version]
# createrepo /var/www/hdp/HDP-UTILS-[version]

4. Make sure that you can browse the new repositories you just created.

Repository Base URL
Ambari Base URL http://[web.server]/ambari/Updates-ambari-[version]
HDP Base URL http://[web.server]/hdp/HDP-[latest.version]
HDP-UTILS Base URL http://[web.server]/hdp/HDP-UTILS-[version]

5. Download the ambari.repo file using the wget command and place it in /etc/yum.repos.d directory.

# wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.0.0/ambari.repo -O /etc/yum.repos.d/ambari.repo
2018-06-25 17:06:34 URL:http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.0.0/ambari.repo [306/306] -> "/etc/yum.repos.d/ambari.repo" [1]

6. The ambari repo file would look like below.

# cat /etc/yum.repos.d/ambari.repo
#VERSION_NUMBER=2.6.0.0-267
[ambari-2.6.0.0]
name=ambari Version - ambari-2.6.0.0
baseurl=http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.0.0
gpgcheck=1
gpgkey=http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.0.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1

You can verify the ambari repo using the “yum repolist” command.

# yum repolist

Sample output:

HDP ambari repo creation

Note: If you do not have access to internet, you can download the repository tarballs from the below links :
Ambari Repositories
HDP Stack Repositories

Filed Under: Hadoop, HDPCA, Hortonworks HDP

Some more articles you might also be interested in …

  1. How to Create HDFS policies in Ranger
  2. HDPCA Exam Objective – Configure NameNode HA
  3. HDPCA Practice Exam Questions and AWS Instance Setup Details
  4. HDPCA Exam Objective – Install ambari-server
  5. CCA 131 – Configure HDFS ACLs
  6. CCA131 – Create an HDFS user’s home directory
  7. CCA131 – Configure NameNode HA
  8. CCA131 – Configuring HDFS snapshot Policy
  9. HDPCA Exam Objective – Install and configure Ranger
  10. HDPCA Exam Objective – Configure HDFS ACLs

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright