3.2.2. Instructions

  • Temporarily reconfigure your firewall to allow Internet access from your mirror server host.

  • Execute the following command to download the appropriate Hortonworks yum client configuration file and save it in /etc/yum.repos.d/ directory on the mirror server host.

    Table 4.4. Deploying HDP - Option II
    Cluster OS HDP Repository Tarballs

    RHEL/ CentOS 5.x

    wget http://public-repo-1.hortonworks.com/HDP- -O /etc/yum.repos.d/hdp.repo

    RHEL/ CentOS 6.x

    wget http://public-repo-1.hortonworks.com/HDP- -O /etc/yum.repos.d/hdp.repo

  • Create an HTTP server.

    1. On the mirror server, install an HTTP server (such as Apache httpd) using the instructions provided http://httpd.apache.org/download.cgi

    2. Activate this web server.

    3. Ensure that the firewall settings (if any) allow inbound HTTP access from your cluster nodes to your mirror server.


      If you are using EC2, make sure that SELinux is disabled.

  • On your mirror server, create a directory for your web server.

    • For example, from a shell window, type: mkdir –p /var/www/html/hdp/.

    • If you are using a symlink, enable the followsymlinks on your web server.

  • Copy the contents of entire HDP repository for your desired OS from the remote yum server to your local mirror server.

    • Continuing the previous example, from a shell window, type:

      cd /var/www/html/hdp
      reposync -r HDP-
      reposync -r HDP-UTILS-

      You should now see both an HDP- directory and an HDP-UTILS- directory, each with several subdirectories.

  • Generate appropriate metadata.

    This step defines each directory as a yum repository. From a shell window, type:

    createrepo /var/www/html/hdp/HDP-
    createrepo /var/www/html/hdp/HDP-UTILS-

    You should see a new folder called repodata inside both HDP directories.

  • Verify the configuration.

    • The configuration is successful, if you can access the above directory through your web browser.

      To test this out, browse to the following location: http://yourwebserver/hdp/HDP-

    • You should now see directory listing for all the HDP components.

  • At this point, it is okay to disable external Internet access for the mirror server, so that the mirror server is once again entirely within your data center firewall.

  • Depending on your cluster OS, configure the yum clients on all the nodes in your cluster

    1. Edit the /etc/yum.repos.d/hdp.repo file, changing the value of the baseurl property to point to your local repositories based on your cluster OS.

      So, for example, if your cluster OS is CentOS 5, you would update the hdp.repo file to look something like this:

      name=Hortonworks Data Platform Version - HDP-
      name=Hortonworks Data Platform Utils Version - HDP-UTILS-

    2. Use scp or pdsh to copy the client yum configuration file to /etc/yum.repos.d/ directory on every node in the cluster.

  • If you have multiple repositories configured in your environment, deploy the following plugin on all the nodes in your cluster.

    1. Install the plugin.

      • For RHEL and CentOs v5.x

        yum install yum-priorities
      • For RHEL and CentOs v6.x

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