3.1.2. Install the Repos

  1. Use a workstation with access to the Internet and download the tarball image of the appropriate Hortonworks yum repository.

    Table 4.3. Deploying HDP - Option I
    Cluster OS HDP Repository Tarballs

    RHEL/ CentOS/Oracle Linux 5.x

    wget http://public-repo-1.hortonworks.com/HDP/centos5/HDP-2.0.6.0-centos5-rpm.tar.gz

    wget http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.16/repos/centos5/HDP-UTILS-1.1.0.16-centos5.tar.gz

    wget http://public-repo-1.hortonworks.com/ambari/centos5/ambari-1.4.1.25-centos5.tar.gz

    RHEL/CentOS/Oracle Linux 6.x

    wget http://public-repo-1.hortonworks.com/HDP/centos6/HDP-2.0.6.0-centos6-rpm.tar.gz

    wget http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.16/repos/centos6/HDP-UTILS-1.1.0.16-centos6.tar.gz

    wget http://public-repo-1.hortonworks.com/ambari/centos6/ambari-1.4.1.25-centos6.tar.gz

    SLES 11

    wget http://public-repo-1.hortonworks.com/HDP/suse11/HDP-2.0.6.0-suse11-rpm.tar.gz

    wget http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.16/repos/suse11/HDP-UTILS-1.1.0.16-suse11.tar.gz

    wget http://public-repo-1.hortonworks.com/ambari/suse11/ambari-1.4.1.25-suse11.tar.gz

    Ubuntu 12.04

    wget http://public-repo-1.hortonworks.com/HDP/ubuntu12/HDP-2.0.6.0-ubuntu12-rpm.tar.gz

    wget http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.16/repos/ubuntu12/HDP-UTILS-1.1.0.16-ubuntu12.tar.gz

  2. Create an HTTP server.

    1. On the mirror server, install an HTTP server (such as Apache httpd) using the instructions provided here.

    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.

      [Note]Note

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

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

    • For example, from a shell window, type:

      • For RHEL/CentOS/Oracle:

        mkdir –p /var/www/html/hdp/
      • For SLES:

        mkdir –p /srv/www/htdocs/rpms 
      • For Ubuntu:

        mkdir –p /var/www/html/hdp/
    • If you are using a symlink, enable the followsymlinks on your web server.

  4. Copy the HDP Repository Tarball to the directory created in step 3, and untar it.

  5. 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/$os/2.x/updates.

      You should see directory listing for all the HDP components along with the RPMs at: $os/2.x/updates.

      where

      • $os can be centos5, centos6, suse11, or ubnuntu12. Use the following options table for $os parameter:

         

        Table 4.4. Options for $os parameter in repo URL

        Operating SystemValue

        CentOS 5

        centos5

        RHEL 5
        Oracle Linux 5

        CentOS 6

        centos6

        RHEL 6
        Oracle Linux 6

        SLES 11

        suse11

        Ubuntu 12

        ubuntu12


  6. Configure the yum clients on all the nodes in your cluster.

    1. Fetch the yum configuration file from your mirror server.

      http://<$yourwebserver>/hdp/$os/2.x/updates/2.0.6.0/hdp.repo  

    2. Store the hdp.repo file to a temporary location.

    3. Edit hdp.repo file changing the value of the baseurl property to point to your local repositories based on your cluster OS.

      [HDP-2.x]
      name=Hortonworks Data Platform Version - HDP-2.x
      baseurl=http://$yourwebserver/HDP/$os/2.x/GA
      gpgcheck=1
      gpgkey=http://public-repo-1.hortonworks.com/HDP/$os/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
      enabled=1
      priority=1
      
      [HDP-UTILS-1.1.0.16]
      name=Hortonworks Data Platform Utils Version - HDP-UTILS-1.1.0.16
      baseurl=http://$yourwebserver/HDP-UTILS-1.1.0.16/repos/$os
      gpgcheck=1
      gpgkey=http://public-repo-1.hortonworks.com/HDP/$os/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
      enabled=1
      priority=1
      
      [HDP-2.0.6.0]
      name=Hortonworks Data Platform HDP-2.0.6.0
      baseurl=http://$yourwebserver/HDP/$os/2.x/updates/2.0.6.0
      gpgcheck=1
      gpgkey=http://public-repo-1.hortonworks.com/HDP/$os/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
      enabled=1
      priority=1

      where

      • $yourwebserver is FQDN of your local mirror server.

      • $os can be centos5, centos6, suse11 or ubuntu12. Use the following options table for $os parameter:

         

        Table 4.5. Options for $os parameter in repo URL

        Operating SystemValue

        CentOS 5

        centos5

        RHEL 5
        Oracle Linux 5

        CentOS 6

        centos6

        RHEL 6
        Oracle Linux 6

        SLES 11

        suse11

        Ubuntu 12

        ubuntu12


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

    4. [Conditional]: 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:

        [main]
        enabled=1
        gpgcheck=0