Case study for setting up 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:

  1. yum install yum-utils createrepo -y
  2. yum install httpd -y
  3. //firewall configuration
  4. sudo systemctl start httpd
  5. sudo systemctl status httpd
  6. mkdir -p /var/www/html/
  7. wget -nv https://archive.cloudera.com/p/ambaridc/7.x/7.1.6.0/centos7/ambaridc.repo -O /etc/yum.repos.d/ambari.repo
  8. wget -nv archive.cloudera.com/p/HDPDC/7.x/7.1.6.0/centos7/hdpdc.repo -O /etc/yum.repos.d/hdp.repo
  9. yum repolist
  10. cd /var/www/html
  11. mkdir -p ambari/centos7
  12. cd ambari/centos7/
  13. reposync -r ambari-7.1.x.x
  14. cd ../..
  15. mkdir -p hdp/centos7
  16. cd hdp/centos7/
  17. reposync -r HDP-7.1.x.x
  18. reposync -r HDP-UTILS-1.1.0.22
  19. createrepo /var/www/html/ambari/centos7/ambari-7.1.x.x
  20. createrepo /var/www/html/hdp/centos7/HDP-7.1.x.x
  21. 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/