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

What are the common commands for yum to install and uninstall software

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article will explain in detail what are the common commands for installing and uninstalling yum software. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

1. Use yum to install and uninstall software on the premise that all packages installed by yum are in rpm format.

The installation command is that yuminstall ~, yum will query the database to see if there is a software package. If there is, check its dependency conflict relationship. If there is no dependency conflict, it is best to download and install it. If so, you will be prompted to ask whether you want to install the dependency at the same time, or delete the conflicting package. You can make your own judgment.

The delete command is, yum remove ~, just like the installation, yum will query the database and give tips for resolving dependencies.

Where ~ represents the software name

1. Install the package command with YUM: yuminstall ~

two。 Delete the package command with YUM: yumremove ~

two。 Use yum to query the software you want to install

We often encounter such a situation, want to install a software, only know that it is related to some aspect, but can not know its name. At this point, the query function of yum works. We can use commands like yum search keyword to search, for example, if we want to install an InstantMessenger, but we don't know what it is, we might as well use an instruction like yum search messenger to search. Yum will search the descriptions of all available rpm and list all the rpm packages related to messeger in the description, so we may get gaim,kopete and so on, and choose from them.

Sometimes we come across the installation of a package, but do not know its purpose, we can use the yuminfo packagename instruction to get information.

1. Use YUM to find software packages

Command: yumsearch ~

two。 List all installable software packages

Command: yumlist

3. List all updatable software packages

Command: yumlist updates

4. List all installed packages

Command: yumlist installed

5. List all packages that are installed but not within Yum Repository

Command: yumlist extras

6. List the specified software packages

Command: yumlist~

7. Use YUM to get package information

Command: yuminfo~

8. List information for all software packages

Command: yuminfo

9. List all updatable package information

Command: yuminfo updates

10. List all installed package information

Command: yuminfo installed

11. List all software packages installed but not within Yum Repository

Command: yuminfo extras

twelve。 List the files provided by the software package

Command: yumprovides~

3. Clear the YUM cache

Yum stores downloaded packages and header in cache instead of automatically deleting them. If we think they take up disk space, we can use the yumclean directive to clear them. More precisely, yumclean headers clears header,yum cleanpackages to clear downloaded rpm packages and yum cleanall to clear all.

1. Clear the software packages under the cache directory (/ var/cache/yum)

Command: yum cleanpackages

two。 Clear the headers under the cache directory (/ var/cache/yum)

Command: yum cleanheaders

3. Clear the old headers under the cache directory (/ var/cache/yum)

Command: yum cleanoldheaders

4. Clear the software packages under the cache directory (/ var/cache/yum) and the old headers

Command: yumclean, yumclean all (= yumclean packages; yumclean oldheaders)

Examples of the use of 4.yum command tools

Yum update` upgrade the system

Yum install ~ install the specified software package

Yum update~ upgrade specified package

Yum remove~ uninstalls the specified software

Yum grouplist looks at the installed and available software groups on the system, and those available can be installed

``yum grooupinstall~ ``installs one of the available software groups shown in the previous command

Yum grooupremove~ uninstalls packages in the specified software group

Yum list yum\ * list all packages that start with yum

Yum localinstall~ installs the rpm package from the hard drive and uses yum to resolve dependencies

Tip 1: speed up your yum. Using yum's extension yum-fastestmirror, I personally think that this plug-in is very effective, and the speed is really significantly improved.

\ # yum- y install yum-fastestmirror

Notice that on CentOS4, the name is yum-plugin-fastestmirror

Tip 2: expand your rpm package many packages are not official, how to deal with him. Do I have to compile it myself? All right, you install this package, this is RedHat5.

\ # Red HatEnterprise Linux 5 / i386:

Rpm-Uhv

\ # Red HatEnterprise Linux 5 / x86room64:

Rpm-Uhv

\ # ATrpms

[atrpms]

Name=CentOS-$releasever-ATrpms

Baseurl=$releasever-$basearch/atrpms/stable

Gpgcheck=1

Skill 3:rpm search. What to do if you can't find the rpm package? go to the following website. It's basically all collected. You can use advanced search to have a look.

Tip 4: download the RPM source package through the yum tool. The premise is that the package yum-utils is installed. If there is an installation.

\ # yum downloader-- source; RPM source code package

Of course, if there is no source package, you also need to add a source.

[linux-src]

Name=Centos$releasever-$basearch-Source

Baseurl=$releasever/os/SRPMS/

Enabled=1

Gpgcheck=1

Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Tip 5: software group installation sometimes we install the system and manage that there is a type of software that is not installed, such as development packages for development, which we can install with software packages.

\ # yum grouplist so you can list all the packages

For example, we need to install development-related packages.

\ # yum groupinstall "Development Libraries"

\ # yum groupinstall "Development Tools"

For example, we need to install Chinese support.

\ # yum deplist package1 # View program package1 dependencies

The use of all the above command parameters can be viewed with man:

[common root@liangxu documents] $man yum

Yum-y install package name (support *): automatically select y, fully automatic

Yum install package name (supported *): manually select y or n

Yum remove package name (not supported *)

Rpm-ivh package name (supported *): install RPM package

Rpm-e package name (not supported *): uninstall rpm package on yum installation and uninstall software common commands are shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can 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: 277

*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

Development

Wechat

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

12
Report