Configure YUM repository using DVD or CD ROM


YUM is the package management tool that helps to install or update the package through the network or local, the same time it provides an easy method to install a package with its dependent packages. Configuration files are under /etc directory, /etc/yum.conf is the mail global file that contains the global options such as cache directory,log directory etc… To add new or update the existing repository, you must got to the /etc/repos.d directory and create or open a file that ends on .repo respectively.

Create Source

Before creating new repository file, you must know the repository source ( where the packages stored locally or remotely); Repository sources can be created either using a createrepo package or mounting the DVD on the directory, mounting the DVD/CD ROM will lead to save the space on hdd used by being copied to HDD.

Mount the CD/DVD ROM on any directory of your wish, for testing mount it on /cdrom.

mount /dev/cdrom /cdrom

Configuration file

Create the new repo file called cdrom.repo under /etc/yum.repos.d directory.
vi /etc/yum.repos.d/cdrom.repo
Add the following details.

name=CDROM Repo
1. [cdrom]  –  Name of the Section.
2. name =  Name of the repository
3. baseurl = Location of the package
4. Enabled = Enable repository
5 gpgcheck= Enable secure installation
6. gpgkey= Location of the key


Install the package using the yum command, let’s install the MySQL package using the YUM.

yum install mysql-server


Loaded plugins: product-id, refresh-packagekit, security, subscription-      : manager
Updating certificate-based repositories.

Unable to read consumer identity

Setting up Install Process

Resolving Dependencies

–> Running transaction check

—> Package mysql-server.x86_64 0:5.1.61-4.el6 will be installed

–> Processing Dependency: mysql = 5.1.61-4.el6 for package: mysql-server                                                                                    -5.1.61-4.el6.x86_64

–> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.6                                                                                    1-4.el6.x86_64

–> Processing Dependency:                                                                                    t) for package: mysql-server-5.1.61-4.el6.x86_64

–> Processing Dependency:                                                                                     for package: mysql-server-5.1.61-4.el6.x86_64

–> Processing Dependency: for package: m                                                                                    ysql-server-5.1.61-4.el6.x86_64

–> Processing Dependency: for package: mys                                                                                    ql-server-5.1.61-4.el6.x86_64

–> Running transaction check

—> Package mysql.x86_64 0:5.1.61-4.el6 will be installed

—> Package mysql-libs.x86_64 0:5.1.61-4.el6 will be installed

—> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed

–> Finished Dependency Resolution

Dependencies Resolved


Package              Arch         Version              Repository  Size



mysql-server         x86_64       5.1.61-4.el6         rhel       8.6 M

Installing for dependencies:

mysql                x86_64       5.1.61-4.el6         rhel       882 k

mysql-libs           x86_64       5.1.61-4.el6         rhel       1.2 M

perl-DBD-MySQL       x86_64       4.013-3.el6          rhel       134 k

Transaction Summary


Install       4 Package(s)

Total download size: 11 M

Installed size: 31 M

Is this ok [y/N]: y

Downloading Packages:


Total                                     63 MB/s |  11 MB     00:00

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : mysql-libs-5.1.61-4.el6.x86_64                        1/4

Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                     2/4

Installing : mysql-5.1.61-4.el6.x86_64                             3/4

Installing : mysql-server-5.1.61-4.el6.x86_64                                                                                                          4/4

Installed products updated.

Verifying  : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                                                         1/4

Verifying  : mysql-libs-5.1.61-4.el6.x86_64                                                                                                            2/4

Verifying  : mysql-server-5.1.61-4.el6.x86_64                                                                                                          3/4

Verifying  : mysql-5.1.61-4.el6.x86_64                                                                                                                 4/4


mysql-server.x86_64 0:5.1.61-4.el6

Dependency Installed:

mysql.x86_64 0:5.1.61-4.el6                    mysql-libs.x86_64 0:5.1.61-4.el6                    perl-DBD-MySQL.x86_64 0:4.013-3.el6


That’s all you have successfully configured the local repository on the machine, but it is limited to the single machine where the CD or DVD is mounted. Follow the guide to set up the repository for the network installation.

Search Term

Install YUM with CD ROM

YUM with CD ROM Configuration

Configure YUM with CD ROM

Configure YUM with DVD ROM under Linux

Configure YUM with DVD ROM on the Linux

Configure YUM on CentOS

Configure YUM with DVD ROM on RHEL

Configure YUM  with DVD ROM on CentOS 5

Configure YUM with DVD ROM on CentOS 6

Configure YUM with CD ROM on RHEL 6

Configure YUM with CD ROM on RHEL 5

YUM with CD ROM Configuration

YUM with CD ROM setup

Setup YUM with CD ROM on CentOS 6

Setup YUM with CD ROM on Linux

You might also like

Configure YUM repository using DVD or CD ROM