<---- template headericclude ----->
How to Create Your Own Yum Repository from ISO Images
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 4 123 ... LastLast
Results 1 to 15 of 48
  1. #1
    Seve's Avatar
    Seve is offline Retired Community Manager
    Join Date
    Oct 2004
    Location
    The GTA, Ontario, Canada
    Age
    65
    Posts
    12,371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to Create Your Own Yum Repository from ISO Images

    Hello:

    Since the release of FC5 the option to install packages directly from the installation DVD/CD has not been available. If you are one of those users that would like to have this option then this how-to is for you.
    This is not a how-to mount a DVD/CD and extract and create a repo from there.
    Please see the
    Additional Notes:
    Section at the end of the post if that is what you would like to do.

    This is the Poor Man's guide to creating a local yum repository which will contain the rpms from your Fedora ISO images.
    For the most part, final release versions of Fedora usually contain somewhere in the range of 1,800-2,300 rpms of which not all are used at the time of installation. [F6 – 5 CD's contained 2,363 rpms] I counted em

    This guide will allow you to create a local repository of those rpms, which will save you download time and band-width usage.

    The guide has been segmented into 7 basic steps and has been written with the assumption that Gnome and Nautilus are being used. However, it can be easily applied to other DE's.

    Target Users:
    New users, users with limited or no internet access, users who are accustomed to having the option to install packaged from install DVD's or CD's and anyone else who would like to save some download band-width and time installing core rpms.

    Applies to both DVD or CD Images.

    Required Skills:
    Basic knowledge of yum and how to become root in Fedora

    Required ISO image(s):
    DVD or CD images of Fedora releases, directly downloaded from one of the mirrors

    Required Hard Disk Space:
    You should expect to use somewhere in the range of 3-3.5 gig for a DVD.

    Note:
    You do not need to burn these images to media, simply saving them to your hard disk is fine.

    Required rpm Packages:
    createrepo

    Optional rpm Packages:
    repoview

    Package Notes:

    All of the above are natively supplied from the standard Fedora Repositories and can be installed with yum. For more information on each package, please see the man pages for each.

    Required Time:
    To go through this guide and set up a working local repository should take roughly 10-20 minutes.
    #-------------------------------------------------------------------------

    Step 1.)

    Determine the presence of the required and optional packages:

    Open a terminal and log in as root using
    su -
    yourpassword
    then type:

    rpm -aq | grep createrepo

    rpm -aq | grep repoview

    If any of the above queries return nothing then you need to install the package.

    For packages that you do not have installed, please do so now with yum.
    createrepo : is with the package of rpms included in the ISO image(s) or the core repository
    repoview : is included in the fedora-extras repo
    #-------------------------------------------------------------------------

    Step 2.)

    Create a directory where you would like to have your local repository.

    Note:
    You can substitute any name that you wish. Just make sure your directory name carries forward and is substituted where appropriate.

    To create a directory named fedora_core in your /home/username/ directory :

    Open a terminal and type the following :

    mkdir fedora_core

    #-------------------------------------------------------------------------

    Step 3.)

    Extract the rpm packages from the ISO image files

    Locate the ISO images that you have saved on your hard disk. For the sake of this how-to, I have assumed the ISO image(s) are located in your /home/username/images/

    Using your file browser – Nautilus, open the folder /home/username/images/
    and right click on the first ISO image [if a CD, it is usually labeled -disc-1]
    Then select :
    Open with “Archive Manager”

    Double click on the Folder named Fedora
    Double click on the Folder named RPMS

    Note: Some released DVD ISO images do not have a sub-directory name RPMS

    You should now see a large number of rpm packages and the location should be:
    /Fedora/RPMS/
    or [which-ever applies i.e. DVD or CD ISO image(s)]
    /Fedora/

    Now Select Extract
    A pop up window will appear where you have a choice labeled Extract in folder :
    You want to select the folder /home/username/fedora_core/
    Once you have found and selected the correct folder, choose, Extract.
    It may take a few moments to extract the rpms to the /home/username/fedora_core/ directory.

    If you are using a DVD ISO image you are finished, if you are using the CD ISO images, then repeat the above process for each one of your ISO images.

    When you have finished this process, double check that your /home/username/fedora_core/ directory contains the rpms, [The directory should contain only the rpms and no folders] if all looks well then on to the next Step.

    #-------------------------------------------------------------------------

    Step 4.)

    Create the correct repodata files with createrepo

    Open a terminal and log in as root using

    su -
    yourpassword

    then type the following:

    createrepo /home/username/fedora_core/

    This may take a few minutes to complete, so be patient.

    When it's finished, move on to the next Step.

    #-------------------------------------------------------------------------

    Step 5.)

    Now we will create the fedora_core.repo file for use with yum

    Open a terminal and log in as root using

    su -
    yourpassword

    then type the following:

    gedit /etc/yum.repos.d/fedora_core.repo

    and copy and paste the following

    HTML Code:
    [fedora_core]
    name=Fedora Core $releasever - $basearch - fedora_core
    baseurl=file:///home/username/fedora_core/
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
    You need to leave at least one blank line after the last line in this file.

    Save and Exit.

    #-------------------------------------------------------------------------

    Step 6.)

    We will now disable the standard core repository.

    While in the same open terminal type :

    gedit /etc/yum.repos.d/fedora-core.repo

    and set
    enabled=1
    to
    enabled=0

    Save and Exit.

    Note:
    The core repo may or may not contain more rpm packages than the ISO images, as such just keep in mind that you can enable the fedora-core.repo at any time.

    #-------------------------------------------------------------------------

    Step 7.)

    We will now test both the enabling of the new repository [fedora_core.repo] and the disabling of the standard [fedora-core.repo].

    While in the same open terminal type :

    yum clean all

    then type

    yum check-update

    Both of these yum commands should execute cleanly and you should see the newly created repository, [fedora_core] enabled and see that the old repository [core] is disabled.

    If, that is what you see, then you are finished ..... have a beer and kick back


    If you receive an error, then slap yourself and go back to Step 5.)

    #-------------------------------------------------------------------------

    Additional Notes:
    If you have no internet connection you will need to disable the standard repositories, which are located in /etc/yum.repos.d
    Those are usually:
    fedora-extras.repo, fedora-core.repo & fedora-updates.repo
    to do so, follow the instructions under Step 6.) above.

    Once those are disabled you will be able to use yum to install packages from the core repository, which you have created.

    If you wish to try other methods of installing packages directly from your DVD / CD and creating / or not creating a local hard drive repository, then please have a look at this site:
    Create a Yum Repository from ISO Images

    #-------------------------------------------------------------------------

    Please give the how-to a whirl and comments and or suggestions as always are appreciated.

    Seve
    Last edited by Seve; 21st April 2007 at 05:07 PM.
    Registered Linux User: #384977
    .................................................. ............
    See the Links below for more Help and those much wanted extras ... :)


  2. #2
    Seve's Avatar
    Seve is offline Retired Community Manager
    Join Date
    Oct 2004
    Location
    The GTA, Ontario, Canada
    Age
    65
    Posts
    12,371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello:
    Just reserving a space as per Firewing1, just in case I left out some items and require some more contiguous space.

    Seve
    Registered Linux User: #384977
    .................................................. ............
    See the Links below for more Help and those much wanted extras ... :)


  3. #3
    Join Date
    Sep 2005
    Location
    Fairfax, VA
    Posts
    1,279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah.... imagine that... a how-to that wasn't written by Firewing1! Thanks for your contributions Seve.

    PS... any changes to your dvd ripping app that you were testing??

  4. #4
    Seve's Avatar
    Seve is offline Retired Community Manager
    Join Date
    Oct 2004
    Location
    The GTA, Ontario, Canada
    Age
    65
    Posts
    12,371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by scotta3234
    Yeah.... imagine that... a how-to that wasn't written by Firewing1! Thanks for your contributions Seve.

    PS... any changes to your dvd ripping app that you were testing??
    Hello Scotta3234:
    Yes, there has been some changes with the dvd app, and I need to have a look at it tomorrow.

    Sorry, that has fallen off the table for a few days and I do know that I need to make some changes to the build.
    How much time that will take ........... I don't know, however I would appreciate it if you are willing to test the puppy and provide some feedback

    Please let me know.

    Thanks

    Seve
    Registered Linux User: #384977
    .................................................. ............
    See the Links below for more Help and those much wanted extras ... :)


  5. #5
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    4,991
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A couple of points:

    For those of you who have the cd iso images (and plenty free disc space) this is the best way to set up a local repository. Your other options involve concatentating the cd isos into a dvd iso (none of the available scripts work with fc6) or investigating multiple mounts and the --split option in createrepo. Please post if you solve this.

    When you create the repository you should also create the group metadata, this is contained in Fedora/base/comps.xml on the install disc and you use the "-g" option in creatrepo to include it ( 'createrepo -g <path to>/Fedora/base/comps.xml .)

    Furthermore, you can add as many rpms as you like to create a custom repository before you run the createrepo command, if you want to add rpms later you can remove the folder <path to>/repodata and <path to>/.repodata and do a createrepo again, with the appropriate options
    Last edited by sideways; 22nd April 2007 at 12:02 AM.

  6. #6
    Join Date
    Jul 2008
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hallo,
    this method is quiet difficult for me. please tell me how to install certain s/w from the dvd. ( i have burnt the .iso image to a dvd).
    ex. i wanna install mysql database server from dvd. please explain me how to do this.

    thank you very much.
    :) ~~~~PrOuDtoBeALiNuxUsEr~~~~ :)

  7. #7
    Join Date
    May 2005
    Location
    Tragic City, Michigan USA
    Posts
    1,703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arshad3m
    hallo,
    this method is quiet difficult for me. please tell me how to install certain s/w from the dvd. ( i have burnt the .iso image to a dvd).
    ex. i wanna install mysql database server from dvd. please explain me how to do this.

    thank you very much.
    If you browse the DVD there should be a "media.repo" file, copy that to the "/etc/yum.repos.d" directory.
    Then you can use the DVD as a repo.

  8. #8
    Join Date
    Jul 2008
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you for your reply.
    but my problem is as follows,
    i found the "media.repo" file in dvd. but i dont have "yum.repos.d" in my "etc" directory.
    what i have in the yum directory is "pluginconf.d"

    please help me.
    :) ~~~~PrOuDtoBeALiNuxUsEr~~~~ :)

  9. #9
    Join Date
    May 2005
    Location
    Tragic City, Michigan USA
    Posts
    1,703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arshad3m
    thank you for your reply.
    but my problem is as follows,
    i found the "media.repo" file in dvd. but i dont have "yum.repos.d" in my "etc" directory.
    what i have in the yum directory is "pluginconf.d"

    please help me.
    I need to add that the media.repo may only work with a F8 install not sure if if will with F9.
    If you have made a default install from a DVD then you should have a "yum.repos.d" directory.

  10. #10
    Join Date
    Jul 2008
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i didnt make a installation from dvd. i made it from livecd. and yesterday only downloaded the dvd. any help please:::??? ::
    :) ~~~~PrOuDtoBeALiNuxUsEr~~~~ :)

  11. #11
    Join Date
    May 2005
    Location
    Tragic City, Michigan USA
    Posts
    1,703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arshad3m
    i didnt make a installation from dvd. i made it from livecd. and yesterday only downloaded the dvd. any help please:::??? ::
    Open the DVD and look in the "Packages" directory for the "fedora-release-9-2.noarch. rpm" and install that.

    That should create the directory and repos.
    Last edited by ryptyde; 5th August 2008 at 02:38 PM. Reason: add fedora release info

  12. #12
    Join Date
    Jul 2008
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think i have already installed it.but from internet. correct me if i am wrong.

    :) ~~~~PrOuDtoBeALiNuxUsEr~~~~ :)

  13. #13
    Join Date
    May 2005
    Location
    Tragic City, Michigan USA
    Posts
    1,703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arshad3m
    i think i have already installed it.but from internet. correct me if i am wrong.
    Looks like everything is installed for the repos. Can you install packages using yum or yumex?
    Last edited by ryptyde; 5th August 2008 at 07:05 PM.

  14. #14
    Join Date
    Jul 2008
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes. i can install packages using yum (i think you are referring the installations done in terminal such as 'sudo yum install unrar'
    they work fine. but all i did is using internet.
    :) ~~~~PrOuDtoBeALiNuxUsEr~~~~ :)

  15. #15
    Join Date
    May 2005
    Location
    Tragic City, Michigan USA
    Posts
    1,703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arshad3m
    yes. i can install packages using yum (i think you are referring the installations done in terminal such as 'sudo yum install unrar'
    they work fine. but all i did is using internet.
    I have used Seves method and created a repo with all of the DVD packages located in my Home directory that works well. I don't know why you wouldn't have a repos.d.repo in /etc and still be able to install packages using yum

Page 1 of 4 123 ... LastLast

Similar Threads

  1. A simple guide to create your own local repository for future re-installation backup
    By jonathonp in forum Guides & Solutions (Not For Questions)
    Replies: 8
    Last Post: 8th April 2009, 07:46 AM
  2. How to create installation DVD from cd images
    By ANew in forum Installation, Upgrades and Live Media
    Replies: 3
    Last Post: 29th January 2009, 09:43 AM
  3. Replies: 16
    Last Post: 22nd September 2006, 01:33 PM
  4. using dd to create images
    By valdes in forum Using Fedora
    Replies: 1
    Last Post: 12th January 2006, 10:46 AM
  5. how do I create a local repository???
    By yr2alex in forum Using Fedora
    Replies: 10
    Last Post: 4th September 2004, 03:01 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]