There are two ways to install the package on the server. One is the method using the yum command, and the other is the method using the rpm command. ① Use yum yum installs the package via the repository in .repo.
# yum install [package name]
② Use rpm
# rpm -ivh [package name]
* When installing a new ivh while watching the progress of the package
# rpm -Uvh [package name]
* Uvh is when upgrading the package
It's used when installing packages and is like a box. The mechanism for installing with yum is described below, so please refer.
Reference link: Learn with yum install! How yum works
https://tech-blog.rakus.co.jp/entry/2017/12/14/105052
I usually install the package with the above mechanism, but If you cannot connect externally or the repository does not exist, you cannot install it with yum, so you need to create it from the repository. Below is how to create a repository.
① Create a mount location as cdrom
# mkdir -p /mnt/cdrom
② Mount
# mount /dev/cdrom /mnt/cdrom
③ Create a .repo file
# vi /etc/yum.repo.d/local_dvd.repo
[local_dvd]
name=RHEL7 test
baseurl=file:///mnt/cdrom/
enabled=1
gpgcheck=0
gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-RHEL7
④ Confirm that .repo is registered
# yum repolist all
⑤ Mount the repository
# mount -t iso9660 /dev/cdrom /media
⑥ Install the package with yum
# yum install [package name]
The above is the flow at the time of installation. The ones that I have referred to are listed below. Thank you for watching until the end!
Registered as a yum repository such as local media
https://shimi-dai.com/register-yum-with-localmedia/
Recommended Posts