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
HDP Repository:
wget http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/centos5/hdp.repo -O /etc/yum.repos.d/hdp.repo
Ambari Repository (Optional):
wget http://public-repo-1.hortonworks.com/AMBARI-1.x/repos/centos5/ambari.repo -O /etc/yum.repos.d/ambari.repo
RHEL/ CentOS 6.x
HDP Repository:
wget http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/centos6/hdp.repo -O /etc/yum.repos.d/hdp.repo
Ambari Repository (Optional):
wget http://public-repo-1.hortonworks.com/AMBARI-1.x/repos/centos6/ambari.repo -O /etc/yum.repos.d/ambari.repo
SLES 11
HDP Repository:
wget http://public-repo-1.hortonworks.com/HDP-1.2.0/repos/suse11/hdp.repo -O /etc/yum.repos.d/hdp.repo
Ambari Repository (Optional):
wget http://public-repo-1.hortonworks.com/AMBARI-1.x/repos/suse11/ambari.repo -O /etc/yum.repos.d/ambari.repo
Note If you are using Ambari to perform the HDP installation, you will need to setup the Ambari repository using the information provided above.
Create an HTTP server.
On the mirror server, install an HTTP server (such as Apache
httpd
) using the instructions provided here.Activate this web server.
Ensure that the firewall settings (if any) allow inbound HTTP access from your cluster nodes to your mirror server.
Note 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-1.2.0 reposync -r HDP-UTILS-1.1.0.15
You should now see both an
HDP-1.2.0
directory and anHDP-UTILS-1.1.0.15
directory, each with several subdirectories.OPTIONAL: If using Ambari:
reposync –r AMBARI-1.x
Generate appropriate metadata.
This step defines each directory as a yum repository.
From a shell window, type:
createrepo /var/www/html/hdp/HDP-1.2.0 createrepo /var/www/html/hdp/HDP-UTILS-1.1.0.15
OPTIONAL: If using Ambari:
createrepo /var/www/html/hdp/AMBARI-1.x
You should see a new folder called
repodata
inside the HDP directories. If using Ambari, you should also see therepodata
directory under theAMBARI-1.x
directory.
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-1.2.0/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 or zypper clients on all the nodes in your cluster
For RHEL and CentOS:
Edit the
hdp.repo
file (downloaded here:/etc/yum.repos.d/
), changing the value of thebaseurl
property to the local mirror URL. For example,http://
yourwebserver
/hdp/HDP-1.2.0/Use scp or pdsh to copy the client yum configuration file to /etc/yum.repos.d/ directory on every node in the cluster.
For SLES:
Edit the
hdp.repo
file (downloaded here:/etc/yum.repos.d/
), changing the value of thebaseurl
property to the local mirror URL. For example,http://
yourwebserver
/hdp/HDP-1.2.0/repos/suse11On every node, invoke the following command:
zypper addrepo -r http://yourwebserver/hdp/HDP-1.2.0/repos/suse11/hdp.repo
OPTIONAL: If using Ambari to perform HDP Installation, configure the Ambari repository on all the nodes in your cluster.
For RHEL and CentOS:
Edit the
ambari.repo
file (downloaded here:/etc/yum.repos.d/
), changing the value of thebaseurl
property to the local mirror URL.For example,
http://
yourwebserver
/hdp/AMBARI-1.x/repos/os
where
os
is either centos5 or centos6Use scp or pdsh to copy the client yum configuration file to /etc/yum.repos.d/ directory on every node in the cluster.
For SLES:
Edit the
ambari.repo
file (downloaded here:/etc/yum.repos.d/
), changing the value of thebaseurl
property to the local mirror URL.For example,
http://
yourwebserver
/hdp/AMBARI-1.x/repos/suse11On every node, invoke the following command:
zypper addrepo -r http://yourwebserver/hdp/AMBARI-1.x/repos/suse11/ambari.repo
If your cluster runs CentOS or RHEL, and if you have multiple repositories configured in your environment, deploy the following plugin on all the nodes in your cluster.
Install the plugin.
For RHEL and CentOS v5.x
yum install yum-priorities
For RHEL and CentOS v6.x
yum install yum-plugin-priorities
Edit the
/etc/yum/pluginconf.d/priorities.conf
file to add the following:[main] enabled=1 gpgcheck=0