Find the answer to your Linux question:
Results 1 to 2 of 2
Hi I wanted to create my own folder called /Softwares so that whenever i download a rpm i could place it there , run createrepo and then use yum install ...
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Posts
    14

    Angry My Custom Repository Creation Technique doesnt work why ??

    Hi I wanted to create my own folder called /Softwares so that whenever i download a rpm i could place it there , run createrepo and then use yum install software_name . Here is the steps which i followed

    logged in as su
    cd /

    1)Created a directed called Softwares
    mkdir Softwares

    2)Copied my rpm files in that directory say sskype.rpm
    cp sskype.rpm '/Softwares/'

    3)Now i ran createrepo
    createrepo /Softwares/
    output was
    [root@localhost /]# createrepo /Softwares
    2/2 - sskype.rpm
    Saving Primary metadata
    Saving file lists metadata
    Saving other metadata

    4)Then i went to etc/yum.repos.d
    created a file called Softwares.repo
    and inserted the following code
    [Softwares]
    name = This is my repo
    baseurl=file:///Softwares
    enabled=1
    gpgcheck=0

    Now when i goto home or some other directory and i type yum install skype.rpm
    It says
    [root@localhost MyLinux]# yum install sskype.rpm
    Loaded plugins: langpacks, presto, refresh-packagekit
    Adding en_US to language list
    Setting up Install Process
    No package sskype.rpm available.
    Error: Nothing to do

    What am i doing wrong am i doing something wrong in the .repo file ??? The only way i could actually install sskype.rpm is to go in the directory where it was installed and type yum install sskype... But then whats the point of the repository... Any help please i think i am making a mistake in the .repo file or something... any help please

  2. #2
    Just Joined!
    Join Date
    Oct 2008
    Posts
    6
    Hi johnacandy,

    Please check the case sensitives whether the directory name is Softwares or softwares in both cases. One more thing after editing/creating the repo file you have to execute one command.

    # yum clean all

    Now you can install your packages using yum install.

    Please follow the procedure


    Here are the steps to configure yum server as well as local repo.....

    1st insert the DVD in to the drive then mount it to a directory.

    # mount /dev/cdrom /mnt

    Then go to the dir

    # cd /mnt/Server then

    Install vsftpd package and createrepo package

    # rpm -ivh vsftpd-<press tab key>
    #rpm -ivh createrepo-<press tab key>

    now go to the directory
    # cd /var/ftp/pub

    Now copy all DVD content to this directory

    # cp -rvf /mnt/* /var/ftp/pub

    Now exit from the directory
    # cd

    Now create a repo for the dir where your all DVD content exists

    # createrepo -v /var/ftp/pub

    then share this directory to your network

    # vim /etc/exports
    /var/ftp/pub 192.168.0.0/24(sync) (Here my network is 192.168.0.0)

    save and exit

    export it

    # exportfs -rv

    now restart the service nfs

    # service nfs restart
    # chkconfig nfs on

    Now open your yum client configuration file

    #vim /etc/yum.repos.d/rhel-debuginfo.repo

    [your share name]
    name=your OS name or anything
    baseurl=ftp://<your yum server ip address>/pub (for yum server)
    enabled=1
    gpgcheck=0
    gpgkey=<text already there>

    save and exit

    if you want to configure this in a stand alone system modify the file as follows.....

    #vim /etc/yum.repos.d/rhel-debuginfo.repo

    [your share name]
    name=your OS name or anything
    baseurl=file:///var/ftp/pub (only for single system)
    enabled=1
    gpgcheck=0
    gpgkey=<text already there>




    Now update this info

    # yum clean all

    Then check the list

    # yum list

    Now install the packages using yum

    Thanks & Regards
    Kalyan Kumar Pasupuleti
    RHCE, LDAP,SELinux Certified

Posting Permissions

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