6. Optional: Configure the Local Repositories

If your cluster does not have access to the Internet, or you are creating a large cluster and you want to conserve bandwidth, you need to provide access to the bits using an alternative method.

  1. Set up the local mirror repositories as needed for HDP, HDP Utils and EPEL.

  2. From the Ambari Server host, fetch the Ambari repository file or RPM package as described in Set Up the Bits. You need a connection to the Internet for this step.

  3. Configure Ambari Server so that it knows to connect to the mirrored repositories during installation.

    1. On Ambari Server, browse to the stacks definitions directory

      cd /var/lib/ambari-server/resources/stacks

      There are two stack definitions in this directory: HDP and HDPLocal. The HDP definition points to the publicly hosted HDP software packages. You must modify the HDPLocal definition to point to the local repositories you have set up.

    2. Browse to the stack HDPLocal 1.2.0 repos directory.

      cd HDPLocal/1.2.0/repos
    3. Edit the repo info file:

      vi repoinfo.xml
    4. You must update the <baseurl> value to point to your local repositories for each operating system that your cluster includes. So, for example, if your system includes hosts running CentOS 6, to point to the HDP and HDP-EPEL repositories, you would update stanzas to look something like this:

        <os type="centos6">
           <repo>       
              <baseurl>http://{your.hosted.local.repository}/HDP-1.2.0/repos/centos6</baseurl>       
              <repoid>HDP-1.2.0</repoid>
             <reponame>HDP</reponame>
           </repo>
           <repo>
             <baseurl>http://{your.hosted.local.repository}/HDP-1.2.0/repos/centos6</baseurl>
             <repoid>HDP-epel</repoid>
             <reponame>HDP-epel</reponame>
             <mirrorslist><![CDATA[http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch]]></mirrorslist>
           </repo>
         </os>  

      The appropriate relative path depends on how you have set up your local repos.

      [Important]Important

      If you have mixed operating systems in your cluster (for example, CentOS 6 and RHEL 6), you must configure the repositories and have properly edited <os type> stanzas for both OSes - centos6 and redhat6. If you do not, some hosts in your cluster will not be able to retrieve the software packages for their operating system.

    5. Save this file.

    6. If you have not already installed the JDK on all hosts, download jdk-6u31-linux-x64.bin to /var/lib/ambari-server/resources.

    7. If you have already installed the JDK on all hosts, you must use the option -j flag when running Ambari Server setup.

      ambari-server setup –j /my/jdk/home

      You must also provide the appropriate JDK path when running the Ambari install wizard. See Installing, Configuring and Deploying the Cluster: Install Options


loading table of contents...