Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A case of finding rpm package by mounting CD under LInux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail the case of finding rpm packages for mounted CDs under LInux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Write at the front

Linux sometimes needs to install the software, of course, it can be installed online through the yum command, or through the downloaded rpm package, but the rpm installation needs to find the rpm package on which the installation software depends. Let's try to operate it today.

System environment CentOS 7.5

[root@localhost /] # cat / etc/redhat-release CentOS Linux release 7.5.1804 (Core)

1. Find the full path of the CD

[root@localhost /] # ls-l / dev | grep cdromlrwxrwxrwx 1 root root 3 March 3 09:32 cdrom-> sr0crw-rw---- 1 root cdrom 21, 1 March 3 09:32 sg1brw-rw---- 1 root cdrom 11, 0 March 3 09:32 sr0

This command knows that the name of the CD is cdrom, and the path of the CD is / dev/cdrom

two。 Mount the CD

[root@localhost /] # mount / dev/cdrom / mnt

Mount: / dev/sr0 write protection, which will be mounted as read-only

This command loads the contents of the directory / dev/cdrom into the directory / mnt, that is, the contents of the directory / dev/cdrom can be accessed under the directory / mnt. If the following content appears, the mount is successful.

[root@localhost /] # cd / mnt/ [root@localhost mnt] # lsCentOS_BuildTag EULA images LiveOS repodata RPM-GPG-KEY-CentOS-Testing-77EFI GPL isolinux Packages RPM-GPG-KEY-CentOS-7 TRANS.TBL

3. Copy destination rpm package

Go to the directory Packages, and then find the target rpm package. Take "telnet client" as an example.

[root@localhost mnt] # cd Packages/ [root@localhost Packages] # ls-l | grep telnet-rw-rw-r-- 2 root root 65632 Aug 11 2017 telnet-0.17-64.el7.x86mm 64.rpmMui rwMui rwMui-2 root root 41804 Aug 11 2017 telnet-server-0.17-64.el7.x86_64.rpm

There are 2 here, but if you look at the name, you can see that the first one is the client and the other is the server. You can select the first one here, and then copy it to / root. The following result indicates success.

[root@localhost Packages] # cp telnet-0.17-64.el7.x86_64.rpm / root/ [root@localhost Packages] # ls-l / root total consumption 72Murrwmuri. 1 root root 1569 June 3 2018 anaconda-ks.cfg-rw-r--r-- 1 root root 65632 March 3 10:08 telnet-0.17-64.el7.x86 villages 64.rpmKui RWKui. 1 root root 0 June 30 2018? .txt

4. Uninstall the CD

After knowing the target rpm package, remember to uninstall the CD! (cut out the directory / mnt first)

[root@localhost Packages] # cd / [root@localhost /] # umount / mnt/ [root@localhost /] # ls-l / mnt/ Total consumption 0

5. Install a copied rpm package

[root@localhost /] # cd root/ [root@localhost ~] # rpm-ivh telnet-0.17-64.el7.x86_64.rpm preparing... # # [100%] package telnet-1:0.17-64.el7.x86_64 has been installed [root@localhost ~] # telnettelnet > about This is the end of the article entitled "the case of finding rpm packages by mounting CDs under LInux" Hope that the above content can be helpful to you, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report