Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Problem in Setting Up a Local Repository with No Internet Access

Problem in Setting Up a Local Repository with No Internet Access

Explorer

I have gone through the instructions in the following official doc by downloading the .tars for HDP and HDP-UTILS

and untared them into /var/www/html/hdp which is my Apache2 home directory.

https://docs.hortonworks.com/HDPDocuments/Ambari-2.4.0.1/bk_ambari-installation/content/hdp_25_repos...

I can see the directory structure from a browser with no problem but don't see the path after "2.x/updates/<latest.version>"

as there supposed to be.

Repository

Base URL

Ambari Base URLhttp://<web.server>/ambari-2.2.0.0/<OS>;
HDP Base URLhttp://<web.server>/hdp/HDP/<OS>/2.x/updates/<latest.version>;
HDP-UTILS Base URLhttp://<web.server>/hdp/HDP-UTILS-<version>/repos/<OS>;

Don't know whether because of this at the "Install, Start and Test" phase of cluster setup with Ambari-server,

I get the following error message...

resource_management.core.exceptions.Fail: Execution of '/usr/bin/apt-get -q -o Dpkg::Options::=--force-confdef --allow-unauthenticated --assume-yes install hdp-select' returned 100. Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package hdp-select
3 REPLIES 3
Highlighted

Re: Problem in Setting Up a Local Repository with No Internet Access

Hi @Yu Song Have you verified that tar files cleanly downloaded, and weren't truncated in any way?

Also check the apache server logs to ensure that files are being served correctly?

Hope that helps!

Highlighted

Re: Problem in Setting Up a Local Repository with No Internet Access

Explorer

Hello Dave, Thank you for your reply!!

I've downloaded multiple times the designated tar.gz file from http://public-repo-1.hortonworks.com/HDP/ubuntu14/2.x/updates/2.5.0.0/HDP-2.5.0.0-ubuntu14-deb.tar.g... and each time the content doesn't contain any folder like "2.x". From the size of the downloads I believe they are complete not partial.

Can you kindly list up the folders we're supposed to get under the /HDP/<OS>/ path?

Highlighted

Re: Problem in Setting Up a Local Repository with No Internet Access

@Yu Song

I performed follwong stpes and my repo is woring fine

yum install yum-utils createrepo -y

yum install yum-plugin-priorities

yum repolist

cd /var/www/html

mkdir -p ambari/<OS>

cd ambari/<OS>

For OS 7

Wget -nv

http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.1.0 -O /etc/yum.repos.d/ambari.repo

To sync ambari repo

reposync -r Updates-ambari-2.2.1.0

Once repo sync is done

Configure local yum file on following path /etc/yum.repos.d/ambari.repo

cat /etc/yum.repos.d/ambari.repo

#VERSION_NUMBER=2.2.1.0-161

[Updates-ambari-2.2.1.0]

name=ambari-2.2.1.0 - Updates

baseurl=http://xxx.xxx.xxx.xxx:80122/repo/centos7/Updates-ambari-2.2.1.0

gpgcheck=0

enabled=0

In this we start the repo on 8012 port. For this we need to do changes in httpd.conf

And then restart the service.

You then try to browse the repo with following URL

http://xxx.xxx.xxx.xxx:8012/repo

Run the createrepo command to create repo . On the /var/www/html/centos7/Updates-ambari-2.2.1.0/

Finally local repo is created for ambari server.

For HDP 2.3

Wget -nv

http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.4.0/hdp.repo -O /etc/yum.repos.d/HDP.repo

reposync - HDP-2.3

cat /etc/yum.repos.d/HDP.repo

#VERSION_NUMBER=2.2.1.0-161

[HDP-2.3]

name=ambari-2.2.1.0 - Updates

baseurl=http://xxx.xxx.xxx.xxx:8012/repo/centos7/HDP2.3/HDP-2.3.4.0

gpgcheck=0

enabled=0

Run the createrepo command to create repo . On the /var/www/html/centos7/HDP2.3/HDP-2.3.4.0

Createrepo -v .

And to see if my local repositories are there, I have used http://<; my server's FQDN :8012/repo.

I use 8012 port for my repo server.

For your case try to open the url on

http://<; my server's FQDN >/repo

You can try with replace only path where you kept the tar.

Don't have an account?
Coming from Hortonworks? Activate your account here