Welcome, Guest! Registration

loc2log

Friday, 2019-02-22
Main » 2017 » January » 30 » Use CentOS distribution iso as yum repository on VMWare
5:34 PM
Use CentOS distribution iso as yum repository on VMWare
I have CentOS 7.0 iso set used as CD/DVD in VMWare, and wanted to use the image as the source to install rpms to my VMWare instance. It appeared quite easy to do:
  1. Even though the iso is used as the CD/DVD in the virtual machine and is "inserted", you still have to mount on the CentOS:
    sudo mount -t iso9660 /dev/sr0 /mnt
  2. Now create a repo file in /etc/yum.repos.d/. E.g. sudo vi /etc/yum.repos.d/CentOS-Media.repo:
    [CentOS-Media]
    name=CentOS-Media
    baseurl=file:///mnt/
    enabled=1
    
  3. You may have to clean all the caches to make sure the new repo is hooked up properly:
    sudo yum clean all
  4. That is pretty much it, yum shall be able to pick up your "CD/DVD" iso just as the other repositories.

Views: 531 | Added by: ep | Tags: centos, Linux, RedHat | Rating: 0.0/0
Total comments: 0
Only registered users can add comments.
[ Registration | Login ]