Saturday, July 28, 2007

yum from ISO image or CD install howto

How to install createrepo?
How to install package from DVD installation disk using yum?
How to install package from mounted DVD image using yum?
How to create a new repo file?
How to mount your Fedora DVD ISO image file?
How to install portmap?

These are the questions that would be covered from this document.

Requirement:

You need install createrepo rpm package. It is available both from installation CDs and from yum network repos. And is not installed by default installation method. This package createrepo is a linux binary that creates repomd repositories from set of rpms.

Now, how to install createrepo.

# yum -y install createrepo

Mount your Fedora ISO DVD image back again.

# mount -o loop -t iso9660 /data/ISO/F7/F-7-i386-DVD.iso /mnt/F7

# cd /mnt

Now createrepo based from your mounted ISO image:

# createrepo .

After several minutes, you'll be having similar screen outputs like below:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
('E', 'r', 'r', 'o', 'r', ' ', 'o', 'p', 'e', 'n', 'i', 'n', 'g', ' ', 'p', 'a', 'c', 'k', 'a', 'g', 'e') - usr/share/doc/xsane-0.994/xsane.RPM

Saving Primary metadata
Saving file lists metadata
Saving other metadata
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Launch your favorite file editor and prepare a new repo file

/etc/yum.repos.d/fedora-CD.repo

file which contains the following as follows:

[fedora-CD]
baseurl=file:///mnt/F7/
enabled=1


Noticed the filename of the repo file was the same with the repo name.

Done.

Now, what if you only have DVD installation disk. Here's how to do it:

# mount /dev/cdrom /mnt/cdrom
# cd /mnt
# createrepo .

Create the repo file as follows

[fedora-CD]
baseurl=file:///mnt/cdrom
enabled=1


Since portmap is not with standara repo sites, you can now yum it and find it from your DVD repo file! Try it!

# yum search portmap

See mine

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Loading "fastestmirror" plugin
Loading "installonlyn" plugin
Repository 'fedora-cd' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
fedora-cd 100% |=========================| 1.3 kB 00:00
primary.xml.gz 100% |=========================| 772 kB 00:00
fedora-cd : ################################################## 2242/2242

portmap.i386 4.0-65.2.2.1 fedora-cd
Matched from:
portmap
The portmapper program is a security tool which prevents theft of NIS
(YP), NFS and other sensitive information via the portmapper. A
portmapper manages RPC connections, which are used by protocols like
NFS and NIS.

The portmap package should be installed on any machine which acts as a
server for protocols using RPC.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

That is all.

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy