This post will cover howto configure local yum repo with group.
by default when you run createrepo it does not creates group repo. Group is not required unless you have specific requirement.
If you have created repo using createrepo RPM_PATH, while running yum grouplist, you’ll get following error.
Error: No group data available for configured repositories
By the time of writing this article centos 6.2 was the latest version, here we have used centos 6.2 i386 version to demonstrate how grouping can be configured locally. You’ll need to change url for different version.
In repodata all you need to look for is comps.xml, this file contains all grouping info.
To Enable group on local yum repo.
here /storage/yum/cent62 is the parent folder of following two dvd mount points
/storage/yum/cent62/dvd1
/storage/yum/cent62/dvd2
cd /storage/yum/cent62
Download group file from centos mirror for centos 6.2
wget http://mirror.centos.org/centos/6.2/os/i386/repodata/cffddde71947e5fe5a7ce5b77b36decb71afe14b09e3160eba4b4acdd90daa9f-c6-i386-comps.xml.gz |
Extract & rename as comps.xml
gunzip cffddde71947e5fe5a7ce5b77b36decb71afe14b09e3160eba4b4acdd90daa9f-c6-i386-comps.xml.gz mv cffddde71947e5fe5a7ce5b77b36decb71afe14b09e3160eba4b4acdd90daa9f-c6-i386-comps.xml comps.xml |
Run createrepo with -g option to create repo with group
createrepo -g comps.xml /storage/yum/cent62/ |
This is all, now with running yum grouplist on client machine, you’ll not get any error.
Sample
centos-local.repo
[base] baseurl=http://192.168.3.2/yum/cent62 enabled=1 gpgcheck=0 |