Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Creating local repository


    I have just installed a Red Hat 6.0 into my 64 bit Dell laptop. (I got this CD from my Red Hat 124 training).

    Now, I have to create a local repository. These are the steps that I took :

    1) cp -av /media/RHEL_6.3\ x86_64\ Disc\ 1/ /var/ftp/pub/Rhel6.0/
    I created the directory Rhel6.0 in /var/ftp/pub to copy the contents of my installation DVD into it.

    2) cd /var/ftp/pub/Rhel6.0/RHEL_6.3\ x86_64\ Disc\ 1/
    This is the fullpath to the contents of the DVD in my local computer

    3)rpm -ivh ./Packages/deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

    4) rpm -ivh ./Packages/python-deltarpm 3.5-0.5.20090913git.el6.x86_64.rpm

    5) rpm -ivh ./Packages/createrepo-0.9.8-5.el6.noarch.rpm

    The above 3 packages are located in the Packages folder in the current directory RHEL_6.3\ ...

    6) cd ..
    (to go up one directory)

    7) createrepo .

    8 ) cd /etc/yum.repos.d/

    9) ls

    These are the contents of the directory above :

    10) vi rhel-source.repo

    name=Red Hat Enterprise Linux $releasever - $basearch - Source
    #name=RHEL 6.0
    name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source

    I have configured the file as above. Could you please help me identify the lines to edit in this file so that I will be able to proceed with yum clean?

    What do I have to insert in baseurl section, and what are the lines that I have to edit?

    When I perform a yum clean with the configurations above, this is what I get :

    [root@localhost yum.repos.d]# yum clean all
    Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
    Updating certificate-based repositories.
    Unable to read consumer identity
    Cleaning repos: adobe-linux-x86_64 rhel-source
    Cleaning up Everything

    When I perform a yum list | wc -l , to see what are the packages available this is what I get :

    [root@localhost yum.repos.d]# yum list | wc -l
    Unable to read consumer identity
    [root@localhost yum.repos.d]#

    I remember when I performed the createrepo command, I saw > 3600 packages, but when I perform a yum list, there is only 1107 packages. Why is this?

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Virginia, USA
    The cd/dvd already contains all the repo data, so you don't need to use 'createrepo'

    Just copy the contents of dvd to a folder.
    Then, in your .repo file

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts