1 Installing a new package
Su-c ' yum install tsclient '
Install package Group
Su-c ' Yum groupinstall ' MySQL Database '
2 Update package
Su-c ' Yum update tsclient '
Update package Group
Su-c ' Yum groupupdate ' MySQL Database '
3 Uninstalling packages (and dependent packages)
Su-c ' yum remove tsclient '
Uninstalling a package group
Su-c ' Yum groupremove ' MySQL Database '
4 Find
Look for packages that you can use from the Yum source, or packages that are already installed on your system. Find default contains installed packages, and available packages. When there is no return result, there is no match.
Su-c ' Yum list httpd '
Su-c ' Yum list httpd-2.2.15 '
If you do not know the package name, you can blur the match
Su-c ' Yum search http '
Do not know the package name, find the package name that contains a file (library file)
Su-c ' Yum provides Libtool '
List all packages that start with "TSC"
Su-c ' Yum list tsc\* '
5 Update Package
Update all packages on the system
Su-c ' Yum Update '
Automatically update datagrams daily
Su-c '/sbin/chkconfig--level yum on;/sbin/service yum start '
6 adding "yum source" as a repository
-6.1 Create a "warehouse file"
Under directory "/etc/yum.repos.d/", define a "warehouse file" with the extension ". Repo"
Su-c ' CP Example.repo/etc/yum.repos.d/51cto.repo '
* The attribute "Gpgcheck" is required for each warehouse file, and if the public key is automatically matched, it needs to be done manually
-6.2 Manual authentication software source
Add a public key from a file to the RPM key ring
Su-c ' rpm--import gpg-pub-key.asc '
Import a public key from a Web site
Su-c ' rpm--import http://www.localhost.com/GPG-PUB-KEY.asc '
7 Managing Yum
7.1 Discard or remove a software source
Set "Enable=0"
Delete the corresponding file from the directory "/etc/yum.repos.d/"
Clear Cache Directory "/var/cache/yum/"
-7.2 Clean Yum cache
Typically, Yum retains the cached packet and packet data information. When the package source changes, the old data may be used.
Clear Package Data file:
Su-c ' Yum clean headers '
Removing packages from the cache
Su-c ' Yum clean packages '
Use in "CentOS-4"
Su-c ' Yum clean metadata '
8 Installing the package manually
Install packages
Su-c ' yum localinstall tsclient-1.17-4.i386.rpm '
--------------------
Reference from Internet https://www.centos.org/docs/4/html/yum/
Some of the content is slightly
650) this.width=650; "title=" wkiom1ybpuwirq3yaabm5lagjro733.jpg "alt=" wkiol1bibppicpb7aabm6p93pb8644.jpg "src=" Http://s3.51cto.com/wyfs02/M00/7D/35/wKioL1bibpPiCPb7AABm6P93Pb8644.jpg "/>
This article from "Little Cui's experimental notes" blog, declined to reprint!
Using the Yum management software package