YUM Configuration in RHEL7/ CentOS 7

YUM Configuration in RHEL7/ CentOS 7

We are going to see YUM Configuration in RHEL7/ CentOS 7 in this post.

In Linux mostly we are using RPM and Yum Package management.

YUM- Yellowdog Updater Modified

Yum is mostly used to install a package without fail by resolving software dependencies.

We can configure yum locally/in network

Required RPM:
1. Yum
2. Createrepo
3. deltarpm
4. python-deltarpm

Configuring YUM in RHEL7

1. Insert RHEL7 media and mount it under /mnt

#mount /dev/cdrom /mnt

2. All the RPM’s available under Packages directory. change to Package Directory and
copy all the RPM’s under any local directory which you have already created.

3. Creating local directory to use as repository

#mkdir /yumpkg

4. Copying RPM’s from media to local directory

#cd /mnt/Packages
#cp *.* /yumpkg

5. Ensure all the required RPM’s installed or not by using below commands

#rpm -qa yum
#rpm -qa createrepo

6. Generate local repository files from yumpkg and create xml file


#cp /mnt/repodata/59eXXXXXX.xml /yumpkg/comps.xml
#cd /yumpkg
#createrepo -g /yumpkg/comps.xml .
7. Create repo file

#vi /etc/yum.repos.d/yum.repo
[server_name]
name=YUM_Server
baseurl=file:///yumpkg
enabled=1
gpgcheck=0

:wq save and exit from yum.repo file

Note: For using ftp/http as repository, we must enter the concerns path in baseurl field

#yum clean all
#yum makecache

8. Now check yum by listing all available RPM’s

#yum list all

9. Than try to install any package using YUM

# yum install vsftp

Other commands of yum

#yum remove <package_name>
#yum update <package_name>
#yum search <package_name>
#yum info <package_name>
#yum list installed
#yum check-update
#yum update
yum groupinstall <package_name>

One thought on “YUM Configuration in RHEL7/ CentOS 7”

Leave a Reply to Rozella Klusman Cancel reply

Your email address will not be published. Required fields are marked *