5.2.3. Setting up a Local Repository Having Temporary Internet Access

After completing the Getting Started Setting up a Local Repository procedure, finish setting up your repository by completing the following steps:

  1. Put the repository configuration files for Ambari and the Stack in place on the host. For options, see Obtaining the Repositories.

  2. Confirm the repositories are available.

    For RHEL/CentOS/Oracle Linux:

    yum repolist

    For SLES:

    zypper repos
  3. Browse to the web server directory.

    For RHEL/CentOS/Oracle Linux:

    cd /var/www/html

    For SLES:

    cd /srv/www/htdocs/rpms
  4. Synchronize the repository contents to your mirror server.

    • For Ambari, create ambari directory and reposync.

      mkdir -p ambari/{$os}
      cd ambari/{$os}
      reposync -r Updates-ambari-1.6.1
    • For HDP Stack Repositories, create hdp directory and reposync.

      mkdir -p hdp/{$os}
      cd hdp/{$os}
      reposync -r HDP-{$latest}
      reposync -r HDP-UTILS-{$version}
  5. Generate the repository metadata.

    • For Ambari:

      createrepo {web-server-directory}/ambari/{$os}/Updates-ambari-1.6.1
    • For HDP Stack Repositories:

      createrepo {web-server-directory}/hdp/{$os}/HDP-{$latest}
      createrepo {web-server-directory}/hdp/{$os}/HDP-UTILS-{$version}

  6. Confirm you can browse to the newly created repository.

    Table 1.11. URLs for the New Repository
    Repository URL

    Ambari Base URL

    http://{web-server}/ambari/{$os}/Updates-ambari-1.6.1

    HDP Base URL

    http://{web-server}/hdp/{$os}/HDP-{$latest}

    HDP-UTILS Base URL

    http://{web-server}/hdp/{$os}/HDP-UTILS-{$version}

    [Important]Important

    Be sure to record these Base URLs. You will need them when installing Ambari and the Cluster.

  7. Optional. If you have multiple repositories configured in your environment, deploy the following plug-in on all the nodes in your cluster.

    1. Install the plug-in.

      • RHEL and CentOS 5

        yum install yum-priorities
      • RHEL and CentOS 6

        yum install yum-plugin-priorities
    2. Edit the /etc/yum/pluginconf.d/priorities.conf file to add the following:

      [main]
      enabled=1
      gpgcheck=0

loading table of contents...