Working on yum for RPM-based distributions(Notes)

Setting Up a yum Repository

7.1. Getting the Packages

Note

If you can’t work with DVD-sized files, you can still create a local repository. For example, if you’ve downloaded the four Fedora Core 4 binary CDs, all you need to do is mount the CDs one at a time, and copy their contents (including the .discinfo file from the first CD) to the directory of your choice. For example, you could run the following commands:

mount -o loop FC4-i386-disc1.iso /media/cdrecorder

cp -ar /media/cdrecorder/* \

/var/ftp/pub/yum/4/i386/os/

If it’s the first CD, don’t forget to copy the .discinfo file to the noted directory. Change CDs:

mount -o loop FC4-i386-disc2.iso /media/cdrecorder

cp -ar /media/cdrecorder/* \

/var/ftp/pub/yum/4/i386/os/

2. installing yum

rpm -Uvh /media/cdrecorder/Fedora/RPMS/yum*
rpm -Uvh /media/cdrecorder/Fedora/RPMS/createrepo*

2-1 header creation.
yum-arch

createrepo
The createrepo command now creates metadata from the headers in XML format

CentOS yum repository management tools

CentOS yum repository management tool


    —- Search

  • 1. yum list package_name (simple search)
    yum list package_name* wildcard supported.
  • 2. yum search package_name (deep search)
  • 3. To do a search for any packages that provide php, you can use the following command
    yum provider php*
    —- Group

  • 1. yum grouplist
  • 2. yum groupinstall groupname