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