How to Create Yum Repository from CDROM Media

In this post, I will guide you on how to install or update the Redhat RPM packages from mounted local CDROM. Assume that you want to install the Redhat 5 packages. Please follow below steps:

1. Mount the CDROM media.

    [root@server ~]# mount /dev/hdc /media

2. Create local.repo in yum.repos.d

    [root@server ~]# cd /etc/yum.repos.d
    [root@server yum.repos.d]# vi local.repos
    [RHEL-5-Repository]
    name=RHEL5 repository
    baseurl=file:///media/Server
    enabled=1
    gpgcheck=0

3. Save and you can start install or update using yum command.

Leave a Reply

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