Yum Using DVD as Package Repository
Posted on In LinuxWe 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:
baseurl=file:///media/CentOS_5.0_Final
‘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.