Setting up a Local Repository With Temporary Internet Access
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 availability of the repositories.
For RHEL/CentOS/Oracle Linux:
yum repolist
For SLES:
zypper repos
For Debian/Ubuntu:
dpkg-list
Synchronize the repository contents to your mirror server.
Browse to the web server directory:
For RHEL/CentOS/Oracle Linux:
cd /var/www/html
For SLES:
cd /srv/www/htdocs/rpms
For Debain/Ubuntu:
cd /var/www/html
For Ambari, create
ambari
directory and reposync.mkdir -p ambari/<OS>
cd ambari/<OS>
reposync -r Updates-ambari-2.2.1.1
where <OS> is centos6, centos7, sles11, ubuntu12, ubuntu14, or debian7.
For HDP Stack Repositories, create
hdp
directory and reposync.mkdir -p hdp/<OS>
cd hdp/<OS>
reposync -r HDP-<latest.version>
reposync -r HDP-UTILS-<version>
Generate the repository metadata.
For Ambari:
createrepo <web.server.directory>/ambari/<OS>/Updates-ambari-2.2.1.1
For HDP Stack Repositories:
createrepo <web.server.directory>/hdp/<OS>/HDP-<latest.version>
createrepo <web.server.directory>/hdp/<OS>/HDP-UTILS-<version>
Confirm that you can browse to the newly created repository.
URLs for the New Repository
Repository
Base URL
Ambari Base URL
http://<web.server>/ambari/<OS>/Updates-ambari-2.2.1.1
HDP Base URL
http://<web.server>/hdp/<OS>/HDP-<latest.version>
HDP-UTILS Base URL
http://<web.server>/hdp/<OS>/HDP-UTILS-<version>
where <web.server> = FQDN of the web server host, and <OS> is centos6, centos7, sles11, ubuntu12, ubuntu14, or debian7.
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.
For RHEL and CentOS 7:
yum install yum-plugin-priorities
For 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