1. Installing and uninstalling the software using Yum is provided that the Yum installed packages are in RPM format.
Install the command is,yuminstall ~,yum will query the database, there is no such package, if any, then check its dependency conflict, if there is no dependency conflict, it is best to download the installation, if there is, will be prompted to ask if you want to install dependencies at the same time, Or delete conflicting packages, you can make your own judgments;
Delete the command is,yum Remove ~, as with the installation,Yum will also query the database, giving a hint to resolve the dependency.
Where ~ represents the software name
1. install the package with yum command: Yuminstall ~
2. Delete package commands with Yum:yumremove ~
2. Use yum to find the software you want to install
We often encounter this situation, want to install a software, only know that it is related to a certain aspect, but do not know exactly its name. This is when Yum's query function works. We can use Yum search keyword such commands to search, such as we would like to install a Instantmessenger, but do not know exactly what, it may be useful to use yum search Messenger such a command to search,yum will search all the available RPM description, listing all the descriptions in the Messeger related to the rpm package, so we may get Gaim, Kopete and so on, and choose from it.
Sometimes we have a package installed, but do not know its purpose, we can use yuminfo packagename This command to obtain information.
1. UseYum Find Packages
Command:Yumsearch ~
2. List all packages that can be installed
Command:Yumlist
3. List all the packages that can be updated
Command:Yumlist Updates
4. List all installed packages
Command:Yumlist installed
5. List all installed but not inPackages in Yum repository
Command:Yumlist Extras
6. List the specified packages
Command:yumlist~
7. Useyum Get package information
command: Yuminfo~
8. Lists information for all packages
command: yuminfo
9. Lists all updatable package information
command: yuminfo updates
10. List all installed package information
command: yuminfo installed
11. List all installed but not in yum Repository Package information
command: yuminfo Extras
12. List which files the package provides
Command: yumprovides~
3. Clear Yum Cache
Yum stores the downloaded packages and headers in the cache without deleting them automatically. If we feel that they are taking up disk space, you can use the yumclean directive to clear, more accurate usage is yumclean headers clear header,Yum cleanpackages clear the downloaded RPM package,yum Cleanall clears all.
1. Clear the packages under the cache directory (/var/cache/yum)
Command:Yum cleanpackages
2. Clear the headers in the cache directory (/var/cache/yum)
Command:Yum cleanheaders
3. Clear the old headers from the cache directory (/var/cache/yum)
Command:Yum cleanoldheaders
4. Clear the Cache directory (/var/cache/yum) package and the old headers
Command:yumclean, yum clean all (= Yum clean packages; yum clean oldheaders)
4.yum Command Tool Use Example
Yum Update upgrade System
Yum Install-Installs the specified package
Yum update~ upgrade specified package
Yum remove~ uninstalling the specified software
Yum grouplist view installed and available software groups in the system, available for installation
Yum Grooupinstall~ installs one of the available software groups shown in the previous command
Yum grooupupdate~ update packages for specified software groups
Yum grooupremove~ uninstalling packages in the specified software group
Yum deplist~ queries the dependencies of the specified package
Yum List yum\* lists all packages that start with Yum
Yum localinstall~ install rpm packages from HDD and use yum to resolve dependencies
5.yum Advanced Management Application Tips
Tip 1: Speed up your yum . Using the yum extension Yum-fastestmirror, personally think this plugin is very effective, the speed really is significantly improved,
#yum-y Install Yum-fastestmirror
Note that on Centos 4 , the name is yum-plugin-fastestmirror .
Tip 2: Extend your rpm package a lot of packages are not official , how to deal with him. Do you want me to compile it myself? OK, you install this package , this is Redhat5 's Oh. You can go to php#b yourself, ">http://dag.wieers.com/rpm/faq.php#b here.
# Red hatenterprise Linux 5/i386:
rpm-uhvhttp://apt.sw.be/redhat/el5/en/i386/rpmforge/rpms/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
# Red hatenterprise Linux 5/x86_64:
rpm-uhvhttp://apt.sw.be/redhat/el5/en/x86_64/rpmforge/rpms//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
#ATrpms
[Atrpms]
name=centos-$releasever –atrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
Gpgcheck=1
Gpgkey=http://atrpms.net/rpm-gpg-key.atrpms
Tips 3:rpm Find . Or there is RPM package can not find how to do , to the following this site. Basically all collected, you can use the advanced search to see . http://rpm.pbone.net/
Tip 4: Download the RPM source package via the Yum tool . The prerequisite is to have the package installed Yum-utils . If it is installed.
#yum Downloader--source; RPM Source Package
#yum Downloader--source vsftpd
Of course , there is no source package , but also to add a source
[LINUX-SRC]
name=centos$releasever-$basearch-source
baseurl=http://mirrors.163.com/centos/$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 a class of software that is not installed, such as a development package for development, which we can install with a package.
#yum grouplist So you can list all the packages
For example, we want to install development-related packages
#yum Groupinstall "Development Libraries"
#yum Groupinstall "Development Tools"
For example, we need to install Chinese support
#yum Groupinstall "Chinese support"
#yum deplist package1 #查看程序package1 Dependency situation
The use of all of the above command parameters can be viewed with man :
[[Email protected] Common documents ]$ man Yum
Yum-y Install package name (Support *): Automatic selection of y, automatic
Yum Install package name (Support *): Manually select y or N
Yum Remove package name (not supported *)
RPM-IVH Package Name (Support *): Install RPM Package
RPM-E Package name (not supported *): Uninstall rpm Package
Upgrade kernel:#yuminstall kernel-headers kernel-devel
Yum installs common commands for uninstalling software