How to install yum-utils and createrepo when offline

General support questions
Post Reply
abhishes
Posts: 14
Joined: 2009/07/18 20:25:36

How to install yum-utils and createrepo when offline

Post by abhishes » 2014/12/15 22:07:12

Hello,

My Linux VM cannot have access to the internet. I need to install yum-utils and createrepo

I searched the internet and everyone is installing these using

Code: Select all

sudo yum install yum-utils createrepo
but I cannot do this because I don't have access to internet ... please give me http servers from which I can download these RPMs (FTP is blocked in my organization).

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: How to install yum-utils and createrepo when offline

Post by gerald_clark » 2014/12/15 22:23:07

If you don't have access to the internet, you will need access to the installation DVD mounted in one of the locations
listed in /etc/yum.repos.d/CentOS-Media.repo.
Then yum --disablerepo=* enablerepo=c6-media install yum-utils createrepo

abhishes
Posts: 14
Joined: 2009/07/18 20:25:36

Re: How to install yum-utils and createrepo when offline

Post by abhishes » 2014/12/16 15:40:23

Thanks.

I mounted my CentOS 6 ISO file. Now when I do ls /mnt I can see

Packages
repodata
RPM-GPG-Centos-6

and many other directories. I can see that the rpms for yum-utils and createrepo are there in the Packages directory.

My CentOS-Media.repo file looks like
baseurl=file:///media/CentOS
file:///mnt/

Now when I do

yum --disablerepo=* --enablerepo=c6-media install createrepo

it says

No Package CreateRepo available
Nothing to do

Why? the Packages directory has the rpm.

I also went directly into the Packages directory and did

rpm -ivh createrepo-0.9.9-22.e16.noarch.rpm

but it says
error: failed dependencies:
python-deltarpm is needed by createrepo-0.9.9-22.e16.noarch.rpm

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: How to install yum-utils and createrepo when offline

Post by gerald_clark » 2014/12/16 16:18:12

abhishes wrote: My CentOS-Media.repo file looks like
baseurl=file:///media/CentOS
file:///mnt/
Mine looks like:
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-6. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c6-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c6-media [command]

[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


-----------------
You need to mount the DVD in one of the locations listed in the repo file.

Post Reply

Return to “CentOS 6 - General Support”