Yum: add a local cdrom repository
Jump to navigation
Jump to search
This is useful when you want to install packages from the local cdrom or .iso file
Tested on rhel 6.2
Mount the cdrom
This can be a locally attached cdrom or an iso file:
# Mount locally attached cdrom
mount /dev/cdrom /mnt/cdrom
# Mount iso file
mount -o loop filename-server-6.2.iso /mnt/cdromCreate the .repo file
Create a file: /etc/yum.repos.d/cdrom.repo
[cdrom]
name=cdrom
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=0Yum away!
Now you can run yum install against the packages on the DVD/CD