Yum Using DVD as Package Repository

We introduce the method to use DVD as the package repository for yum. In this post, we use CentOS 5 as the example.

1) Modify /etc/yum.repos.d/CentOS-Base.repo

Delete baseurls in [Base] baseurl by add ‘#’ at the beginning of the lines

Then add a line at the end:


‘file://’ means this is a local directory.

Here, ‘/media/CentOS_5.0_Final’ is the mount point of the DVD.

2) Delete /etc/yum.repos.d/CentOS-Media.repo

# mv /etc/yum.repos.d/CentOS-Media.repo ~/

3)Import repository signature

# rpm --import /media/CentOS_5.0_Final/RPM-GPG-KEY-CentOS-5

4) Then you can install software from the DVM using yum.

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

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