Another World Headline Animator

Another World

Photography

http://www.flickr.com/photos/sroyc/

I am a "Photographic artist" and take suitable assignments.

Leave your comment with contact details.

Google Ads

Tuesday, November 07, 2006

Using pirut to add new packages in Fedora Core

****UPDATE****

This method can be used for FC6 too.
______________________________

I use Fedora Core 5, so this tutorial is written based on that, though it should work perfectly with other distros too.

1. Create a directory on your system to hold the repository. It will need to be on a
file system that has at least 3GB of free space. Then copy the RPM packages and comps.xml
file from your CD images into it.This directory can be made in a FAT32 partition provided you have edited your fstab file to enable Linux to automount those partition and also you have atleast read access.
--------------------------------------------------------

# mkdir -p /path/to/your/repo/RPMS
# cd /path/to/your/repo
# mkdir disc1 disc2 disc3 disc4 disc5
# mount -r -o loop /path/to/FC-5-i386-disc1.iso disc1
# mount -r -o loop /path/to/FC-5-i386-disc2.iso disc2
# mount -r -o loop /path/to/FC-5-i386-disc3.iso disc3
# mount -r -o loop /path/to/FC-5-i386-disc4.iso disc4
# mount -r -o loop /path/to/FC-5-i386-disc5.iso disc5
# cp disc*/Fedora/RPMS/* RPMS ----This comand copies all the available RPMs to the user specified directory. If due to any reason this command does not work, then you can manually copy all the RPMs to your desired directory. Its better to create this directory in a ext2/3 file system. Otherwise this process may fail.


# cp disc1/repodata/comps.xml ----THIS IS VERY IMPORTANT STEP. DO NOT FORGET TO COPY THIS FILE. Remember to copy this file to the immediate parent directory of the folder where you copied your RPMs. Eg, if you copied your RPMs to /var/yum/RPM then copy this file to /var/yum.

________________________________________________


2. You no longer need the CD images, so you can unmount them and remove the mountpoint
directories.

# umount disc1 disc2 disc3 disc4 disc5
# rmdir disc1 disc2 disc3 disc4 disc5

_____________________________________________


3. In this step we are going to edit three system files. So before you edit them, DO NOT FORGET TO CREATE BACKUPS of these three files in their original forms. As you are going to need them to be put back if you want to update or install from net.

Now navigate to the folder /etc/yum.repo.d and find the file fedora-core.repo. Open this file in a text editor like gedit. Now add the following lines at the top of the file


[Fedora-Core-5-local-install]
name=Fedora Core $releasever - $basearch
baseurl=file:///var/yum
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

You can find three more paragraphs like this after your newly inserted one. Put enabled=0 in all those three paragraphs. Do this similarly to other two files named fedora-extras.repo and fedora-update.repo.

4. Now reboot and you should be able to use your ADD/REMOVE Softwares [PIRUT] to install all the other packages available in the CDs [like Thunderbird].
===========================

This tutorial's process is not entirely mine. I found these informations on net while searching. I edited and compiled it giving some of my own input :D.

4 comments:

Anonymous said...

Hi ! nice work. i got this link from LinuxForums. it worked like charm. thanx.
siboo

Anonymous said...

thank you very much. it worked :)
i also got it from linuxforums.

Anonymous said...

thanx a lot !
Joe

Anonymous said...

realy very good tutorial fantastic
work thanks very much i strugled lot thank one again