yum install createrepo
mkdir /mnt/dvd1 && mkdir /mnt/dvd2 && mkdir /opt/repo && mkdir /opt/iso
mount -o loop /opt/iso/CentOS-6.6-x86_64-bin-DVD1.iso /mnt/dvd1/ && mount -o loop /opt/iso/CentOS-6.6-x86_64-bin-DVD2.iso /mnt/dvd2/
rsync -arv /mnt/dvd1/ /opt/repo/
rsync -arv /mnt/dvd2/ /opt/repo/
createrepo -c cache -s sha -update -groupfile `ls /opt/
(
Read more... )