In the old days, software applications are distributed as source code and to install it to your Linux box, you will need to compile it. there is a famous command called make install
Linux companies like Redhat invented a better way to distribute the applications which what we call it packages. Redhat introduced Redhat Package Manager which is using rpm files to install and compile your application with minimum commands, later another issue emerged which the package dependency, so It was a time consuming to locate all the required packages for an application to be installed.
This is where applications like YUM and apt-get start to have more usage in the package management space. check this URL for more https://www.digitalocean.com/community/tutorials/package-management-basics-apt-yum-dnf-pkg
This quick article is about using yum command, but usually, you need an online source to download the packages or network server, this article how to make Linux source DVD as a source for the packages that will be installed by yum.`
This simply can be done by creating a repo file that uses Redhat/CentOS DVD as a yum repository, follow the steps below to know how to achieve this.
Create a file named /etc/yum.repos.d/CentOS_DVD.repo by typing
Edit the file and add the following lines
to edit the file type
Click i to insert text, copy the section below and paste it in your file
Tip: the second line refers to the CD mount directory, the last line refers to the GPG key located in your OS DVD, you may change them to match your OS.
Exit your editor, if you are using vi editor, you can do this by press ESC and type wq! to write the contents to the file and quit.
ensure you have mounted OS DVD to your /media directory, this can be done by the following command
#mount /dev/cdrom /media
Next, you need to inform local yum of the new repository, run this command to list the current recognized repos