top of page
Recent Posts
Writer's pictureAbdur Rouf

How to configure YUM to install package from RHEL8.2 DVD repository

Updated: Oct 3, 2021

Document ID: RHEL005


In my previous post I've discussed about software package installation procedure using rpm command. In this post we will discuss package installation using yum.



yum : rpm command can be used to install and upgrade software package but it is not designed to work with package repositories or resolve dependencies, to resolve dependencies we use yum.


We can use yum command which has capability to resolve dependency requirement.


To use DVD ROM repository in yum command we have to complete below steps.



Step1: Unmount DVD (if it is mounted) and mount it again using loop option.

[root@RHEL82 Packages]# cd ~

[root@RHEL82 ~]# umount /media

[root@RHEL82 ~]# mount -o loop /dev/sr0 /media/


[/dev/sr0 or it may be /dev/sr1, we can use /dev/sr then press “tab” key to check available devices name]


Now, DVD has mounted in /media directory, check with #mount command


Step2: Go to /etc/yum.repos.d/

[root@RHEL82 ~]# cd /etc/yum.repos.d/

[root@RHEL82 yum.repos.d]# ls

redhat.repo

[root@RHEL82 yum.repos.d]#pwd

/etc/yum.repos.d


Step3: Create a local repo file "/etc/yum.repos.d/dvd.repo" with below content

[root@RHEL82 yum.repos.d]# vim dvd.repo

It wll open a blank file press “i” [insert mode]copy and paste below text

=============================

[DVD-Appstream]

name=DVD-Appstream

baseurl=file:///media/AppStream

enabled=1

gpgcheck=0

[DVD-BaseOS]

name=DVD-BaseOS

baseurl=file:///media/BaseOS

enabled=1

gpgcheck=0

=============================

:wq

[save & exit]



Step4:

[root@RHEL82 yum.repos.d]# yum clean all

Updating Subscription Management repositories.

Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

0 files removed



[root@RHEL82 yum.repos.d]# yum repolist



You can see DVD-Apstream & DVD-BaseOS repo created and enabled



Step5: install “httpd” package using yum command

root@RHEL82 yum.repos.d]# yum install httpd





We can see 9 separate packages has installed automatically to resolve dependency.


Step6: To check installation

[root@RHEL82 media]# yum list httpd

Updating Subscription Management repositories.

Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Last metadata expiration check: 0:13:05 ago on Fri 18 Sep 2020 01:18:52 PM +04.

Installed Packages

httpd.x86_64 2.4.37-21.module+el8.2.0+5008+cca404a3 @DVD-Appstream





Step7: To remove package using yum

[root@RHEL82 ~]# yum remove httpd






Now we can install any software package which is exists in DVD ROM.



To update software package

[root@RHEL82 media]# yum update package_name

[root@RHEL82 media]# yum update httpd


To get information about software pacakge

[root@RHEL82 media]# yum info package_name


To list of installed software package group

[root@RHEL82 media]# yum group list


To install a group of packages

[root@RHEL82 media]# yum group install "Group Name"

Example

[root@RHEL82 media]# yum group install "RPM Development tools"



To display transaction history

[root@RHEL82 media]# yum history

Updating Subscription Management repositories.

Unable to read consumer identity

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

ID | Command line | Date and time | Action(s) | Altered

-------------------------------------------------------------------------------

8 | install httpd | 2020-09-18 13:37 | Install | 9

7 | remove httpd | 2020-09-18 13:33 | Removed | 9

6 | install httpd | 2020-09-18 13:28 | Install | 9

5 | install vsftpd | 2020-09-18 00:28 | Install | 1

4 | remove vsftpd | 2020-09-18 00:24 | Removed | 1

3 | install vsftpd | 2020-09-18 00:12 | Install | 1

2 | remove httpd | 2020-09-17 23:59 | Removed | 12 <

1 | | 2020-08-27 22:52 | Install | 1683 >E



To update all package

[root@RHEL82 media]# yum update


Next post: Creating and managing users and group




120 views0 comments

Recent Posts

See All

댓글


Log In to Connect With Members
View and follow other members, leave comments & more.
bottom of page