Vous êtes sur la page 1sur 2

Configure YUM repository using DVD or CD ROM

YUM is the package management tool that help to install or update the package through the
network or local, the same time it provides 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 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 the 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/repos.d directory.
vi /etc/repos.d/cdrom.repo
Add the following details.
[cdrom]
name=CDROM Repo
baseurl=file:///cdrom
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

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

Vous aimerez peut-être aussi