The first thing you need to prepare is your iso files of the CentOS installation cd/dvd. Just follow these steps :
- Backup your current yum repos configuration
[root@localhost ~] tar -zcvf ~/yum.repo.tar.gz /etc/yum.repos.d/*
- Copy your CentOS iso files to your prefered dir
[root@localhost ~] cp /media/usb/CentOS-*.iso ~/
- Create directory for each of iso
[root@localhost ~] mkdir -p /media/iso/{1,2,3,4,5,6}
- Mount each of your iso files to those folders
[root@localhost ~] mount -t iso9660 -o loop ~/CentOS-1of6.iso /media/iso/1 [root@localhost ~] mount -t iso9660 -o loop ~/CentOS-2of6.iso /media/iso/2 [root@localhost ~] mount -t iso9660 -o loop ~/CentOS-3of6.iso /media/iso/3 [root@localhost ~] mount -t iso9660 -o loop ~/CentOS-4of6.iso /media/iso/4 [root@localhost ~] mount -t iso9660 -o loop ~/CentOS-5of6.iso /media/iso/5 [root@localhost ~] mount -t iso9660 -o loop ~/CentOS-6of6.iso /media/iso/6
- Install create repo from your mounted iso
[root@localhost ~] cd /media/iso/5/CentOS [root@localhost CentOS] rpm -i createrepo*.noarch.rpm
- Clean your yum cache
[root@localhost ~] yum clean all
- Register your mounted iso directory as repo
[root@localhost ~] cd /media/iso [root@localhost iso] createrepo .
- Now you can install software as usual (this yum example will install software of yum groupinstall "Development Tools")
[root@localhost ~] yum install gcc gcc-c++ automake autoconf flex bison pkgconfig rpm-build gettext gdb libtool binutils redhat-rpm-config
~/CentOS-5.0-i386-bin-1of6.iso /media/iso/1 iso9660 loop 0 0
~/CentOS-5.0-i386-bin-2of6.iso /media/iso/2 iso9660 loop 0 0
~/CentOS-5.0-i386-bin-3of6.iso /media/iso/3 iso9660 loop 0 0
etc
No comments:
Post a Comment