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

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 :

[root@centos63 ~]# 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:

[root@centos63 ~]# vi /etc/yum.repos.d/centos63.repo
name=DVD-CentOS6.3 repository

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

[root@centos63 ~]# yum install perl -y

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>