For Red Hat Enterprise Linux 4
In /etc/sysconfig/rhn/sources, comment out the following line: # up2date default
dir mydvdrepo /media/cdrom/RedHat/RPMS
For Red Hat Enterprise Linux 5
First please update the yum tool's version to yum-3.2.8-9 or higher. As there is a bug in RHEL5.1.The url error has been fixed in yum version 3.1 and above according to:https://bugzilla.redhat.com/show_bug.cgi?id=212180
Second create a dvd.repo text file in /etc/yum.repos.d/ with the following content:
[dvd]
mediaid=1170972069.396645*
name=DVD for RHEL5
baseurl=file:///media/RHEL_5%20i386%20DVD/Server
(For example for RHEL 5.5 version baseurl line should look like
'baseurl=file:///media/RHEL_5.5%20i386%20DVD/Serverenabled=1')
gpgcheck=0
(*) The mediaid= value comes from the .discinfo file located in the root of the DVD.# yum install dovecot --noplugins
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package dovecot.i386 0:1.0-1.2.rc15.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
dovecot i386 1.0-1.2.rc15.el5 dvd 1.5 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 1.5 M
Is this ok [y/N]:
If problems occur while trying this procedure, run yum clean all and try running yum install again.[dvd-cluster]
mediaid=1170972069.396645
name=DVD for RHEL5 - Cluster
baseurl=file:///media/RHEL_5%20i386%20DVD/Cluster
enabled=1
gpgcheck=0
[dvd-cluster-storage]
mediaid=1170972069.396645
name=DVD for RHEL5 - ClusterStorage
baseurl=file:///media/RHEL_5%20i386%20DVD/ClusterStorage
enabled=1
gpgcheck=0
[dvd-vt]
mediaid=1170972069.396645
name=DVD for RHEL5 - VT
baseurl=file:///media/RHEL_5%20i386%20DVD/VT
enabled=1
gpgcheck=0
For more information, see man yum and the following related article:
For Red Hat Enterprise Linux 6
# mount -o loop RHEL6.0-20101111.0-Server-x86_64-DVD.iso /media/rhel6
# cp /media/media.repo /etc/yum.repos.d/rhel6.repo
# vi /etc/yum.repos.d/rhel6.repo
baseurl=file:///media/rhel6/Server
[dvd-HighAvailability]
mediaid=1289489697.332694
name=DVD for RHEL6 - HighAvailability
baseurl=file:///media/rhel6/HighAvailability
enabled=1
gpgcheck=0
[dvd-LoadBalancer]
mediaid=1289489697.332694
name=DVD for RHEL6 - LoadBalancer
baseurl=file:///media/rhel6/LoadBalancer
enabled=1
gpgcheck=0
[dvd-ResilientStorage]
mediaid=1289489697.332694
name=DVD for RHEL6 - ResilientStorage
baseurl=file:///media/rhel6/ResilientStorage
enabled=1
gpgcheck=0
[dvd-ScalableFileSystem]
mediaid=1289489697.332694
name=DVD for RHEL6 - ScalableFileSystem
baseurl=file:///media/rhel6/ScalableFileSystem
enabled=1
gpgcheck=0
No comments:
Post a Comment