Yum online upgrade mechanism. After analyzing the title database of RPM, Yum produces a dependency-dependent solution based on the dependencies of each software, and can then automatically handle the software's dependency property issues to resolve software installation or removal and upgrade issues.
In the actual work, we mainly apply Yum's query, install, upgrade and delete functions
1. Enquiry
(1) Package view
List: Lists all the software names provided above the Yum server, as shown in just a few. #yum List
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5E/01/wKioL1UpEDyi_jc9AAGvrzq93uo939.jpg "title=" Image 3. PNG "width=" 735 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:735px;height:115px; "alt=" Wkiol1upedyi_ Jc9aagvrzq93uo939.jpg "/>
(2) List updates: Lists what software is available for native upgrades. If only a few #yum list updates are displayed
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5E/05/wKiom1UpEJHwQuG3AAK0VFCRf1I864.jpg "title=" Image 4. PNG "width=" 735 "height=" 124 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:735px;height:124px; "alt=" Wkiom1upejhwqug3aak0vfcrf1i864.jpg "/> (3) List installed: Lists the software that is currently installed on the system. If only a few #yum list installed are displayed
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5E/01/wKioL1UpEwLArzbQAAOgoq2eQ6E692.jpg "title=" image 5. PNG "width=" 735 "height=" 104 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:735px;height:104px; "alt=" Wkiol1upewlarzbqaaogoq2eq6e692.jpg "/> (4) Info: Find out what the function of a software is. such as #yum info zip
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5E/01/wKioL1UpFCSSn9eZAAKLDJ6kgnw654.jpg "title=" image 6. PNG "width=" 735 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:735px;height:230px; "alt=" Wkiol1upfcssn9ezaakldj6kgnw654.jpg "/> (5) Search: Searches for an important keyword for a software name or description. such as #yum search zip
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5E/01/wKioL1UpFSDigozdAAbB6tEBIk0611.jpg "title=" Image 7. PNG "width=" 735 "height=" 285 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:735px;height:285px; "alt=" Wkiol1upfsdigozdaabb6tebik0611.jpg "/> (6) provides: Search the software from the file. Functions similar to RPM-QF. such as #yum provides/ect/passwd
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5E/05/wKiom1UpFJuDWWoJAAFh8SXqe9o777.jpg "title=" Image 8. PNG "width=" "height=" 156 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:600px;height:156px; "alt=" Wkiom1upfjudwwojaafh8sxqe9o777.jpg "/>
(7) Repolist: Lists all available warehouses that have been configured. such as #yum repolist
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5E/05/wKiom1UpFX7jiw9qAACgAN45GsY057.jpg "title=" Image 9. PNG "width=" 735 "height=" border= "0" hspace= "0" vspace= "0" style= "width:735px;height:51px;" alt= " Wkiom1upfx7jiw9qaacgan45gsy057.jpg "/> (8) Clean all: clears all caches. such as #yum clean all
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5E/05/wKiom1UpFiGT1WCEAADjln5f9kQ899.jpg "title=" image 10. PNG "alt=" wkiom1upfigt1wceaadjln5f9kq899.jpg "/>
(9) List name*, you can see what the software name begins with name, and which ones are not already installed. For example #yum list pam*
Such as.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5E/07/wKiom1UpF8zDQmi4AAJFQdTaKiE931.jpg "title=" image 13. PNG "width=" 735 "height=" 103 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:735px;height:103px; "alt=" Wkiom1upf8zdqmi4aajfqdtakie931.jpg "/>" grouplist: See what software groups are available for installation. such as #yum grouplist
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5E/04/wKioL1UpGdjSX4FhAABvk-4OcLU443.jpg "title=" image 14. PNG "alt=" wkiol1upgdjsx4fhaabvk-4oclu443.jpg "/>
(one) GroupInfo: View information about a group.
(groupinstall): Install a group of software.
2. Installation
(1) Install: Installs a software. such as #yum install Zsh
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5E/12/wKiom1UpHdbihJDAAAHZqVVyTjQ479.jpg "title=" image 15. PNG "width=" 735 "height=" 204 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:735px;height:204px; "alt=" Wkiom1uphdbihjdaaahzqvvytjq479.jpg "/> (2) You can also use the install to specify the software. For example #yum install zsh-4.3.10-7.el6.x86_64.rpm.
(3) Reinstall: Reinstall, overwrite the installation. For example #yum Reinstall ZSH
3. Upgrade
(1) Update: Upgrade a software. For example #yum update zsh
(2) Downgrade: Downgrade a software. For example, downgrade zsh-4.3.10-9.el6.x86_64.rpm to zsh-4.3.10-7.el6.x86_64.rpm
#yum downgrade zsh-4.3.10-7.el6.x86_64.rpm
(3) Check-update: Check the software that needs to be updated. For example #yum check-update
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5E/13/wKiom1UpIUPDbmNvAAKmPY4f-pk369.jpg "title=" image 16. PNG "width=" 735 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:735px;height:130px; "alt=" Wkiom1upiupdbmnvaakmpy4f-pk369.jpg "/>
4. Uninstall
Remove: Remove a software. such as #yum remove zsh
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5E/0F/wKioL1UpI1XhpmejAAFRb7HfWeA100.jpg "title=" image 17. PNG "width=" 735 "height=" 167 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:735PX;HEIGHT:167PX; "alt=" Wkiol1upi1xhpmejaafrb7hfwea100.jpg "/>5, package Group Management
(1) List all package groups: Grouplist, such as #yum Grouplis
(2) Show specified package group details: groupinfo, e.g. #yum groupinfo group_name
(3) Installation: Groupinstall, e.g. #yum Groupinstall group_name
(4) Uninstall: Groupremove, e.g. #yum Groupremvoe group_name
(5) Upgrade: groupupdate, e.g. #yum groupupdate group_name
6, use Install, update, remove can also directly manage the package group
Install package Group: #yum Install @ "Group_name"
Upgrade Package Group: #yum update @ "group_name"
Delete package Group: #yum Remove @ "group_name"
7. Options available for the Yum command:
-Y: Auto Answer "yes"
--disablerepo=: Temporarily disables a repository that is configured and enabled in the configuration file;
--enablerepo=: Temporarily enables a specified repo;
--nogpgcheck: Prohibit package check
8. Yum has built-in variables: For storing information about the current platform.
(1) $raleasever: Major version number of the current OS release
For example, for Centos6.6 x86_64, the major version number is 6
(2) $arch: Platform
For example, i386,i486
(3) $basearch: Basic Platform,
For example, the basic platform of i686,i586,i486 and i386 is the same as i386;
(4) $YUM 0-$YUM 9
Example: baseurl=http://repo.magedu.com/centos/$releasever/$basearch
The current system is CentOS 6.6 x86_64,http://repo.magedu.com/centos/6/x86_64
This article from the "Linux Learning" blog, declined reprint!
The basics of Yum usage in CentOS