View Full Version : How To: Offline Personal Repository

23rd January 2008, 06:56 PM
Here is how to make an offine reposirory, which you can keep in your hard disk dvd or anywhere and install from there.

Please Update pirut and Yum to the latest, as the previous version contains bugs and it crashes.

This article is very easy and still not developed as it could followed to make a full powered repository.
This article will update with more fine and perfect details.
Readers are requested to correct any mistakes and add their experiences.

[1]In this section I will assume that you have kept all the packages in a directory named "/home/user/Softwares"
Please replace the path which matches your file structer.
Under this directory, there may be rpm files or more subfolders which contains more rpm files.
Like gstreamer plugins in "home/user/Software/gstreamer" folder,its deps in "/home/user/Softwares/gstreamer/deps" folder.
So you dont have to dump all the rpms in one dir.

[2]Then launch the "konsole"

[3]run command createrepo -pd /home/user/Softwares/

The -p switch will make the xml files and the -d command will make the sqlite databases.
After this command you will find a directory is created inside the "/home/user/Softwares" directory
named "repodata"; and the xml and sqlite databases in it.
(To update use createrepo --update /home/user/Softwares)

Check man createrepo for more details.

[4]Now make a text file inside the folder "/home/user/Softwares" named local.repo the name "local" may vary as your choice.

Now open the local.repo with your favorite text editor (kwrite my choice)
and write thease lines

name=<repo name>

Please replace the lines above is per your system

open "pirut"
Or just click Kmenu->System->Add/Remove Softwares
give the root password.
Click Edit->Repositories
Click Add
Give a Name to the repository
Give a Description
Now at the location field
type in
click close
and your repository will start working
Check the list and you will see your packages in it.

Points To Check:
Remember to keep the necessary deps in your repository or else you wont be able to install the softs offline.

To download the packages with its deps offline and add it to you repository you may use opyum

[1]download and install opyum

[2]Export your profile.

[3]And in connect to the net and import your same profile in the same machine pr move it in another machine with net connection
and download the rpms you need through opyum and get them in a yum pack.

[4]Untar the yum pack in the location you have the repository and you will get the rpms.
[5]To update the repository run
createrepo --update /home/user/Softwares

I prefer freshy install fedora in a partition with ALL THE PACKAGES then import the profile,
so the profile becomes baseline,
then you download addons and packages and make a repo that you will require after each fedora installation.

Konwn Issues:
pirut crashes after once you install packages. To avoid. Keep the Fedora media repository checked.
Please help me solve this issue, and make this more advanced.

23rd January 2008, 07:46 PM
Would this help?

24th January 2008, 03:30 PM
yes i read it but will it help if i download selected packages from the net and then dump it in a dir in hdd and them make a repo offline?/

24th January 2008, 03:44 PM
Have a look at this thread :
How to Create Your Own Yum Repository from ISO Images (http://forums.fedoraforum.org/showthread.php?t=153437&highlight=Seve)

The concept is the same, however keep in mind that each time you change the contents of your local repo, you will have to run createrepo again.


27th January 2008, 09:32 AM
Seve thanks for the page, but i discovered the createrepo command yeterday night and was able to make an offline repo, and today morn i checked this post. so please dont think this is a copy.
I think createrepo --update /path/to/packages will update the database.
and there is no need to make the repo again.

13th March 2008, 01:28 AM
Now why can't they add the installation media to pirut at installation time?