How to configure yum repository (with groupinstall) in redhat 6
Posted by Md. Mahidul Hasan on 2:55 AM with 2 comments
How to configure yum repository (with groupinstall) in redhat 6
Create a local repository repository:
First insert the redhat 6.X dvd in the dvdrom and mount it.
[root@gw ~]# mount /dev/dvdrw /mnt/
Copy the Packages folder to a location
[root@gw ~]# cp -Rfv /mnt/Packages /storage/
[root@gw ~]# cd /storage/Packages
Lets install dependencies for createrepo:
[root@gw Packages]# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
[root@gw Packages]# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
[root@gw Packages]# rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm
[root@gw Packages]# cd ..
[root@gw storage]# createrepo Packages
[root@gw storage]# cd
[root@gw ~]# vim /etc/yum.repos.d/local.repo
[local_repo]
name=RedHat6
baseurl=file:///storage/Packages/
enabled=1
gpgcheck=0
[root@gw ~]# yum clean all
Testing yum install:
[root@gw ~]# yum list
[root@gw ~]# yum install vim
Unmount the dvd drive
[root@gw ~]# umount /mnt/
Configure yum group install:
Insert the redhat 6.X dvd in the dvdrom and mount it.
[root@gw ~]# mount /dev/dvdrw /mnt/
[root@gw ~]# mkdir -P /storage/Packages_grp
[root@gw ~]# cp -pfr /mnt/Server/* /storage/Packages_grp/
[root@gw ~]# cd /storage/Packages_grp/
[root@gw Packages_grp]# createrepo -g repodata/1a7fc54d30d0d44222742c63069ab0126afef9f160931cc15e564dbe6414f268-comps-rhel6-Server.xml .
Please note that total file name of "-comps-rhel6-Server.xml" may be change to your distribution.
[root@gw Packages_grp]# cd
[root@gw ~]# vim /etc/yum.repos.d/group.repo
[group_repo]
name=RedHat6
baseurl=file:///storage/Packages_grp/
enabled=1
gpgcheck=0
[root@gw yum.repos.d]# yum clean all && yum makecache
Unmount the dvd drive
[root@gw ~]# umount /mnt/
Testing groupinstall:
[root@gw ~]# yum grouplist
[root@gw ~]# yum groupinstall "Web Server"
Create a local repository repository:
First insert the redhat 6.X dvd in the dvdrom and mount it.
[root@gw ~]# mount /dev/dvdrw /mnt/
Copy the Packages folder to a location
[root@gw ~]# cp -Rfv /mnt/Packages /storage/
[root@gw ~]# cd /storage/Packages
Lets install dependencies for createrepo:
[root@gw Packages]# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
[root@gw Packages]# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
[root@gw Packages]# rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm
[root@gw Packages]# cd ..
[root@gw storage]# createrepo Packages
[root@gw storage]# cd
[root@gw ~]# vim /etc/yum.repos.d/local.repo
[local_repo]
name=RedHat6
baseurl=file:///storage/Packages/
enabled=1
gpgcheck=0
[root@gw ~]# yum clean all
Testing yum install:
[root@gw ~]# yum list
[root@gw ~]# yum install vim
Unmount the dvd drive
[root@gw ~]# umount /mnt/
Configure yum group install:
Insert the redhat 6.X dvd in the dvdrom and mount it.
[root@gw ~]# mount /dev/dvdrw /mnt/
[root@gw ~]# mkdir -P /storage/Packages_grp
[root@gw ~]# cp -pfr /mnt/Server/* /storage/Packages_grp/
[root@gw ~]# cd /storage/Packages_grp/
[root@gw Packages_grp]# createrepo -g repodata/1a7fc54d30d0d44222742c63069ab0126afef9f160931cc15e564dbe6414f268-comps-rhel6-Server.xml .
Please note that total file name of "-comps-rhel6-Server.xml" may be change to your distribution.
[root@gw Packages_grp]# cd
[root@gw ~]# vim /etc/yum.repos.d/group.repo
[group_repo]
name=RedHat6
baseurl=file:///storage/Packages_grp/
enabled=1
gpgcheck=0
[root@gw yum.repos.d]# yum clean all && yum makecache
Unmount the dvd drive
[root@gw ~]# umount /mnt/
Testing groupinstall:
[root@gw ~]# yum grouplist
[root@gw ~]# yum groupinstall "Web Server"
Awesome write up! Thanks so much! :)
ReplyDeleteThank you. :)
Delete