• Github
  • StackOverflow
  • Linkedin

Tuesday, September 5, 2017

Providing Yum Repository using CD/DVD installation for non supported repository

Hello there, if you were facing the same problem with me its okay. Sometimes we don't know how to install software for CentOS for spesific version which no longer supported by online repository or maybe you don't have internet connection. This solution below will give you a chance to install everything from only your cd/dvd installation media as your yum repository.

Firstly after you've finished installing CentOS, login to system using root access that you'd setup during installation, then follow these steps to make yum cdrom :

1. Create directory as an iso container
    mkdir -p /media/cdrom







2. Mount cdrom media to directory
    mount /dev/cdrom /media/cdrom







3. Backup your current repo files on your home dir
    mv /etc/yum.repo.d/CentOS-* ~







4. Insert cdrom repo file using nano
    nano /etc/yum.repo.d/cdrom.repo
    [cdrom]
    name=CDROM Repo
    baseurl=file:///media/cdrom
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release








5. Save the file and then type yum update



There.... you're now can install your software from cdrom.


No comments:

Post a Comment