How to Setup and Configure Yum Repository from CD-ROM/DVD-ROM image on CentOS 6.3

Share this Article :

This post will covers the basic steps to configure and setup local yum repository from DVD/CDROM on linux CentOS 6.3. By using, local yum repository, you can perform install and update the RPM packages easily even though the CentOS server running behind proxy or does not have internet connection.

1. Insert DVD/ISO into DVD-Drive.
2. Mount the ISO from the DVD-ROM into /mnt directory :

[[email protected] ~]# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only

3. Create centos63.repo text file in /etc/yum.repos.d/ with the following content. Please create something as follow:

[[email protected] ~]# vi /etc/yum.repos.d/centos63.repo
[CentOS6.3-Repository]
name=DVD-CentOS6.3 repository
baseurl=file:///mnt
enabled=1
gpgcheck=0

4. Finish. You can start install, remove and update using yum command :
Example :

[[email protected] ~]# yum install perl -y

Leave a Reply