Updating HDP repo files
When the cluster settings for the HDP repository URL is updated, repository files on hosts are not immediately regenerated. The files are re-generated when you add a new component or service. But an inaccessible repository URL causes the Package Manager to display an error about the unavailable repository URL when you update the package lists. Cloudera recommends you to manually update the URLs in the HDP repository files (for example, /etc/yum.repos.d/ambari-hdp-1.repo) on all agent hosts.
Case study for setting up a local repository
Review this case study to understand - how to prepare a local repository for Ambari 7.1.x.x and HDP 7.1.x.x on Centos7:
- yum install yum-utils createrepo -y
- yum install httpd -y
- //firewall configuration
- sudo systemctl start httpd
- sudo systemctl status httpd
- mkdir -p /var/www/html/
- wget -nv https://archive.cloudera.com/p/ambaridc/7.x/7.1.6.0/centos7/ambaridc.repo -O /etc/yum.repos.d/ambari.repo
- wget -nv https://archive.cloudera.com/p/HDPDC/7.x/7.1.6.0/centos7/hdpdc.repo -O /etc/yum.repos.d/hdp.repo
- yum repolist
- cd /var/www/html
- mkdir -p ambari/centos7
- cd ambari/centos7/
- reposync -r ambari-7.1.x.x
- cd ../..
- mkdir -p hdp/centos7
- cd hdp/centos7/
- reposync -r HDP-7.1.x.x
- reposync -r HDP-UTILS-1.1.0.22
- createrepo /var/www/html/ambari/centos7/ambari-7.1.x.x
- createrepo /var/www/html/hdp/centos7/HDP-7.1.x.x
- createrepo /var/www/html/hdp/centos7/HDP-UTILS-1.1.0.22/
The repositories will be available at the local web server:
- http://<web.server>/ambari/centos7/ambari-7.1.x.x/
- http://<web.server>/hdp/centos7/HDP-7.1.x.x/
- http://<web.server>/hdp/centos7/HDP-UTILS-1.1.0.22/