After completing the Getting Started Setting up a Local Repository procedure, finish setting up your repository by completing the following steps:
Put the repository configuration files for Ambari and the Stack in place on the host. For options, see Obtaining the Repositories.
Confirm the repositories are available.
RHEL/CentOS/Oracle Linux:
For RHEL/CentOS/Oracle Linux:
yum repolist
For SLES:
zypper repos
Browse to the web server directory.
For RHEL/CentOS/Oracle Linux:
cd /var/www/html
For SLES:
cd /srv/www/htdocs/rpms
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.0
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}
Generate the repository metadata.
For Ambari:
createrepo {web-server-directory}/ambari/{$os}/Updates-ambari-1.6.0
For HDP Stack Repositories:
createrepo {web-server-directory}/hdp/{$os}/HDP-{$latest} createrepo {web-server-directory}/hdp/{$os}/HDP-UTILS-{$version}
Confirm you can browse to the newly created repository.
Table 1.12. URLs for the New Repository Repository URL Ambari Base URL
http://{web-server}/ambari/{$os}/Updates-ambari-1.6.0
HDP Base URL
http://{web-server}/hdp/{$os}/HDP-{$latest}
HDP-UTILS Base URL http://{web-server}/hdp/{$os}/HDP-UTILS-{$version}
Important Be sure to record these Base URLs. You will need them when installing Ambari and the Cluster.
Optional. If you have multiple repositories configured in your environment, deploy the following plug-in on all the nodes in your cluster.
Install the plug-in.
RHEL and CentOS 5
yum install yum-priorities
RHEL and CentOS 6
yum install yum-plugin-priorities
Edit the
/etc/yum/pluginconf.d/priorities.conf
file to add the following:[main] enabled=1 gpgcheck=0