How to setup yum groupinstall for RHEL6
Tags rhcsa, rhel6, yum, yum groupinstall
Just found out that we can install packages under Red Hat as a group, instead of individual ones, which will be a big time saver, along with trying to remember the name of the individual packages. I've seen a number of tutorials online for this and I think they either fall short or are not clear. So here is my attempt at it and this blog entry assumes the end user has some basic Linux skills and basic knowledge of Red Hat.
Step-by-step instructions on setting up the following:
- setup local yum repo
- copy down the correct xml file
- run the commands to set it yum and test
I'm using RHEL6 as a VM, however this should work for either CentOS or Scientific Linux (I've only tested this on RHEL6).
After starting up your VM, log in, and lets first create the local repo. All commands are run as user root.
Mount the install DVD
Test that the DVD has mounted and you should see it
Change into the RHEL6 DVD
Make a directory to copy all rpm down to
Copy all rpm in the Packages directory to /tmp/local_repo
Change into the repodata directory on the RHEL DVD and copy down the comps-rhel6-Serverl.xml.gz. This file will have a long string preceding the comps part of the file name
Change into /tmp/local_repo and setup the local repository with the following package and following command:
Unzip the comps-rhel6-Server.xml.gz file
Run the commands to createrepo with the -g flag (groupfile)
Create the local repo by doing the following:
For the local.repo file populate it with the following:
Save the file and run the following commands
To test, install the Virtualization Group, which would be KVM software suite, with the following commands
Step-by-step instructions on setting up the following:
- setup local yum repo
- copy down the correct xml file
- run the commands to set it yum and test
I'm using RHEL6 as a VM, however this should work for either CentOS or Scientific Linux (I've only tested this on RHEL6).
After starting up your VM, log in, and lets first create the local repo. All commands are run as user root.
Mount the install DVD
Code:
mount -t iso9660 /dev/sr0 /media/dvd
Code:
mount
Code:
cd /media/dvd/Packages
Code:
mkdir -p /tmp/local_repo
Code:
cp -R * /tmp/local_repo
Code:
cp -i (file-name-here)-comps-rhel6-Server.xml.gz /tmp/local_repo
Code:
rpm -ivh createrepo python-deltarpm deltarpm
Code:
gunzip (file-name-here)-comps-rhel6-Server.xml.gz
Code:
createrepo -g /tmp/local_repo/(file-name-here)-comps-rhel6-Server.xml /tmp/local_repo
Code:
cd /etc/yum.repos.d vim local.repo
Code:
[server] name=RHEL6 baseurl=file:///tmp/local_repo enabled=1 gpgcheck=0
Code:
yum clean all ; yum makecache ; yum grouplist ; yum list all
Code:
yum groupinstall -y "Virtualization ; yum groupinstall -y "Virtualization Client" ; yum groupinstall -y "Virtualization Platform"