Hello Friends,
This Topic is about setup Local DVD Yum (Yellowdog Updater Modifier) Repository in Red Hat Enterprise Linux or CentOS (applicable to all version). To install Software in RHEL or CentOS we need rpm packages. we have two different tools to install any software one is 'rpm' and another is 'yum'. RPM stands for Red Hat Package Manager, it is used to install software package with a .rpm extension file, it installs packages with a single file and does not process its dependencies (if required). and second one is YUM it stands for Yellowdog Updater Modifier. it is the best tool to install software packages in RHEL/CentOS, before installing packages via YUM we need to configure YUM repositories, It is also available online, many open-source development programs offers online repositories. Here we will learn to setup Local Repository with RHEL/CentOS 7 DVD.
To Setup Yum repository we would require :
RHEL OS DVD
'createrepo' package
1. Mount OS DVD in Server to /dvd mount-point and copy all contents to a OS Directory /localrepo
# mkdir /dvd
# mount /dev/sr0 /dvd
Following command will copy all contens of /dvd to /localrepo
# mkdir /localrepo
# cd /dvd
# find . | cpio -pmdv /localrepo/
Keep patience It will take some time to complete.
2. Checkup if 'createrepo' package is available or not, if not available install it manually
# rpm -qa | grep -i createrepo
# cd /localrepo/Packages
# rpm -Uvh createrepo-x.xxxxx.rpm
3. Run createrepo to create Repository Database
# createrepo -v /localrepo
Keep patience It will take some time to complete.
4. Create a .repo file in '/etc/yum.repos.d/' location to read repository data and package files
# cd /etc/yum.repos.d/
# vi local.repo
[Local]
name=Local_Repository
baseurl=file:///localrepo
enabled=1
gpgcheck=0
5. Save above file and check for repository
# yum clean all
# yum repolist
Above command will show information of available repository.
Try to install any package with YUM
# yum install bind -y
It will install 'bind' package along with its all dependencies.
Hope You are now able to configure Local DVD Repository !!
||Thanks for Reading ||
Comment your suggestions and opinions in comment box !!
good document .thanks for help
ReplyDelete