Breaking

How To Set Up and Use Yum Repositories on a CentOS / RHEL from DVD ISO





This article describes How To Set Up and Use Yum Repositories on a CentOS / RHEL from DVD ISO


CentOS DVD ISO contains large number of RPM software packages. By using this packages we can create a yum server to install software on centos.


Step1: Download CentOS DVD ISO

you can download CentOS DVD ISO from any centos mirror links. Open terminal and issue following comand

# wget http://centos.mirror.snu.edu.in/centos/6.9/isos/x86_64/CentOS-6.9-x86_64-bin-DVD1.iso





Step 2: Mount CentOS DVD ISO to any folder


After downloading centosdvd.iso file, Mount this iso file to a folder by this command

# mkdir dvdrepo

# mount -o loop /root/CentOS-6.9-x86_64-bin-DVD1.iso  /root/dvdrepo/


Step 3: Create Configuration File. 

yum configuration files are placed under /etc/yum.repos.d directory. Create centosdvdiso.repo file and edit it as following


# vim /etc/yum.repos.d/centosdvdiso.repo

[centosdvdiso]
name=CentOS DVD ISO
baseurl=file:///root/dvdrepo/
enabled=1
gpgcheck=1
gpgkey=file:///root/dvdrepo/RPM-GPG-KEY-CentOS-6


Step 4: Clear the yum Caches and Update

# yum clean all

# yum update



No comments:

Powered by Blogger.