Software housekeeper YUM under Linux

After analyzing the header data of RPM ,     yum makes a solution when the attributes are dependent on the dependencies of each software, and then it can automatically deal with the problem of software dependencies, so as to solve the problems of software installation or removal and upgrade.

    For example: if you want to install the NetBeans integrated development environment, you must first install the JDK with the rpm command, and then you can successfully install NetBeans. If you use the YUM command, the system will automatically install JDK for you first, and then install NetBeans for you.

    Note: For the RPM mechanism , please refer to here: http://woqilin.blogspot.com/2014/02/linux.html

In     short, it is equivalent to 360 Software Manager and Tencent Computer Manager. The difference is that YUM is managed through the command line.

Query with yum

 

[root@www ~]# yum [option] [query work item] [related parameters]
Options and parameters:
[option]: The main options, including:
  -y : When yum waits for user input, this option can automatically provide a yes response;
  --installroot=/some/path : install the software on /some/path instead of using the default path
[Query work item] [Related parameters]: The parameters in this regard are:
  search : Search for a software name or an important keyword in the description;
  list : List all software names and versions currently managed by yum, somewhat similar to rpm -qa;
  info : Same as above, but somewhat similar to the execution result of rpm -qai;
  provides: Search for software from files! Similar to rpm -qf function!

Example 1: What are the software related to searching for a disk array (raid)? 
[root@www ~]# yum search raid
 ....(Omitted before)....
mdadm.i386 : mdadm controls Linux md devices (software RAID arrays)
lvm2.i386 : Userland logical volume management tools
....(Omitted later)....
# The left side of the colon (:) is the software name, and the right side is the name setting in the RPM (software name)
# Look! The above results, isn't this software related to RAID? If you want to know the software content of mdadm?

Example 2: Find out what the function of the software mdadm is 
[root@www ~]# yum info mdadm 
Installed Packages       <== This means that the software is already installed 
Name : mdadm           <== The name of this software 
Arch : i386            <= = This software's compilation architecture 
Version: 2.6.4           <== This software's version 
Release: 1.el5           <== Released version 
Size : 1.7 M           <== This software's total file capacity 
Repo : installed       <== Container The report says installed
Summary: mdadm controls Linux md devices (software RAID arrays)
Description:             <==See? This is rpm -qi
mdadm is used to create, manage, and monitor Linux MD (software RAID)
devices.  As such, it provides similar functionality to the raidtools
package.  However, mdadm is a single program, and it can perform
almost all functions without a configuration file, though a configuration
file can be used to help with some common tasks.


Example 3: List all software names provided on the yum server 
[root@www ~]# yum list 
Installed Packages <== installed software
Deployment_Guide-en-US.noarch            5.2-9.el5.centos       installed
Deployment_Guide-zh-CN.noarch            5.2-9.el5.centos       installed
Deployment_Guide-zh-TW.noarch            5.2-9.el5.centos       installed
....(omitting in the middle).... 
Available Packages <== other software that can also be installed
Cluster_Administration-as-IN.noarch      5.2-1.el5.centos       base
Cluster_Administration-bn-IN.noarch      5.2-1.el5.centos       base
....(omitted below)....
# The meaning provided above is: "The software name version is in that container"

Example 4: List the software currently available on the server that can be upgraded by this machine? 
[root@www ~]# yum list updates  
Updated Packages
Deployment_Guide-en-US.noarch            5.2-11.el5.centos      base
Deployment_Guide-zh-CN.noarch            5.2-11.el5.centos      base
Deployment_Guide-zh-TW.noarch            5.2-11.el5.centos      base
....(omitted below)....
# The above lists the software and versions that can provide upgrades in that container!

Example 5: List the software that provides the passwd file 
[root@www ~]# yum provides passwd
passwd.i386 : The passwd utility for setting/changing passwords using PAM
passwd.i386 : The passwd utility for setting/changing passwords using PAM
# turn up! It is the above software that provides the passwd program!

 

Previous: Software Manager for Linux

 

Personal homepage: http://woqilin.blogspot.com

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326653231&siteId=291194637
Recommended