Configure-DVD-as-YUM-repository
Linux

Configuring DVD as YUM repository in RHEL5 made easy

1 440

Few days ago someone asked me how to configure yum repository. Configuring DVD as local yum repository is very straightforward .

First insert Linux ISO in DVD.




Then  mount DVD in linux

mount -t iso9660 -o ro /dev/hdc /mnt
where /dev/hdc is device name of dvd. You can find this name by df -h command
 
[root@yum-local-server Server]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      5.8G  2.2G  3.3G  40% /
/dev/sda1              99M   13M   82M  14% /boot
tmpfs                1006M     0 1006M   0% /dev/shm
/dev/hdc              3.6G  3.6G     0 100% /media/RHEL_5.7 x86_64 DVD
/dev/hdc              3.6G  3.6G     0 100% /mnt

once dvd is mounted  go to /mnt directory and do ll you should see Server directory (Linux 5)

now you need to configure yum configuration file to use DVD as yum repository

Create a file with extension repo (.repo) in /etc/yum.repos.d/ directory

 

[root@yum-local-server Server]# vi /etc/yum.repos.d/dvd.repo
[dvd]
name=local dvd repo
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0

Now issue command

[root@yum-local-server Server]# yum repolist
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
repo id                                                                      repo name                                                                            status
dvd                                                                          local dvd repo                                                                       3,261
repolist: 3,261
[root@yum-local-server Server]#




you will see repo as dvd

now just try to search for telnet package

[root@yum-local-server Server]# yum search telnet
Loaded plugins: product-id, security, subscription-manager
Updating Red Hat repositories.
=========================================================================== Matched: telnet ============================================================================
telnet.x86_64 : The client program for the telnet remote login protocol.
telnet-server.x86_64 : The server program for the telnet remote login protocol.
mtr.x86_64 : A network diagnostic tool.
conman.x86_64 : ConMan - The Console Manager
curl.i386 : A utility for getting files from remote servers (FTP, HTTP, and others).
curl.x86_64 : A utility for getting files from remote servers (FTP, HTTP, and others).
curl-devel.i386 : Files needed for building applications with libcurl.
curl-devel.x86_64 : Files needed for building applications with libcurl.
expect.i386 : A program-script interaction and testing utility
expect.x86_64 : A program-script interaction and testing utility
expect-devel.i386 : A program-script interaction and testing utility
expect-devel.x86_64 : A program-script interaction and testing utility
expectk.x86_64 : A program-script interaction and testing utility
krb5-workstation.x86_64 : Kerberos 5 programs for use on workstations.
perl-Net-Telnet.noarch : Net-Telnet Perl module
pexpect.noarch : Pure Python Expect-like module
screen.x86_64 : A screen manager that supports multiple logins on one terminal
tcp_wrappers.i386 : A security tool which acts as a wrapper for TCP daemons.
tcp_wrappers.x86_64 : A security tool which acts as a wrapper for TCP daemons.
tn5250.x86_64 : 5250 Telnet protocol and Terminal
x3270-text.x86_64 : IBM 3278/3279 terminal emulator for text mode
x3270-x11.x86_64 : IBM 3278/3279 terminal emulator for the X Window System
[root@yum-local-server Server]#

Now you are good to go to install any package (if it is present in repository)

I hope you have liked this tutorial

Thanks and see you in next tutorial

SUBSCRIBE OUR NEWSLETTER
Join us by subscribing to our newsletter and learn IT subjects for free
We hate spam. Your email address will not be sold or shared with anyone else.

Leave a reply

You must be logged in to post a comment.