The software installation of CentOS can be broadly divided into two types:
[centos]rpm file installation, use RPM directive similar to [Ubuntu]deb file installation, use dpkg directive [Centos]yum Install similar [ubuntu]apt-get install RPM command
(a) query system installed software information
For a RPM package, there are "-" and "." Consists of the following parts: * Package Name * Version Information * Release version number * Run platform, when Noarch appears, represents the software can be platform compatible 1) query the system has installed software
Rpm-qa
2) query which package a file is already installed in;
RPM-QF absolute path to file name
3) query where the installed packages are installed;
Software name definition is: RPM Package removal platform information and suffix information
RPM-QL Software Name
4) query information for an installed package
Rpm-qi Software Name
5) Check the configuration file of the installed software;
RPM-QC Software Name
6) View a document where the software has been installed:
RPM-QD Software Name
7) Check the packages and files on which the software is installed;
RPM-QR Software Name
(b) For non-installed package information query
1) To view the use of a software package, version and other information;
Rpm-qpi rpm File
2) View the files contained in a package;
RPM-QPL rpm File
3) View the location of the package's documentation;
RPM-QPD rpm File
4) View the configuration file of a package;
RPM-QPC rpm File
5) View dependencies for a package
RPM-QPR rpm File
(iii) installation, upgrading, deletion of software packages, etc.
1) Install or upgrade a RPM package
RPM-IVH rpm File "Install" RPM-UVH rpm file "Update"
2) Delete a RPM package
RPM-E Software Name
How to force removal of software, regardless of dependencies, and add--nodeps after the above command
(iv) Signature Import
RPM--import Signature file rpm--import Rpm-gpg-key
Yum command
(i) the basic concept of Yum
1) What is Yum?
Yum = Yellow Dog Updater, Modified main function is more convenient to add/remove/update RPM packages. It can automatically solve the dependency problem of the package. It makes it easy to manage a large number of system update issues
2) Features of Yum
Multiple repository (Repository) Concise profiles can be configured at the same time (/etc/yum.conf automatically resolves dependency issues encountered when adding or removing RPM packages easy to maintain consistency with RPM database
3) Yum Installation
CentOS comes with (yum-*.noarch.rpm) #rpm-IVH yum-*.noarch.rpm first need to import the system's Rpm-gpg-key before enabling Yum for the first time:
(ii) Use of Yum directives
When using the Yum management software for the first time, Yum will automatically download the required headers placed in the/var/cache/yum directory;
1) Update of RPM package
#检查可以更新的软件包
Yum Check-update
#更新所有的软件包
Yum Update
#更新特定的软件包
Yum Update kernel
#大规模的升级
Yum Upgrade
2) Installation and removal of RPM packages
#rpm包的安装和删除
Yum install XXX "service name"
Yum Remove xxx "service name"
3) information about the Yum cache
#清楚缓存中rpm包文件
Yum Clean Packages
#清楚缓存中rpm的头文件
Yum Clean headers
#清除缓存中旧的头文件
Yum Clean Old headers
#清除缓存中旧的rpm头文件和包文件
Yum Clean All
4) Package Information query
#列出资源库中所有可以安装或更新的rpm包
Yum List
#列出资源库中特定的可以安装或更新以及已经安装的rpm包
Yum List firfox*
N: You can use wildcard characters in RPM package names to query similar RPM packages
#列出资源库中所有可以更新的rpm包
Yum list Updates
#列出已经安装的所有的rpm包
Yum List installed
#列出已经安装的但是不包含在资源库中的rpm包
Yum List Extras
N: The RPM package that is installed by downloading the website
#rpm包信息显示 (info parameter with list), lists all the RPM packages that can be installed or updated in the repository
Yum Info
#列出资源库中特定的可以安装或更新以及已经安装的rpm包的信息
Yum Info firefox*
N: You can use the match in the RPM package name
#列出资源库中所有可以更新的rpm包的信息
Yum Info Updates
#列出已经安装的所有的rpm包的信息
Yum Info installed
#列出已经安装的但是不包含在资源库中的rpm包的信息
Yum Info Extras
N: Information about the RPM package installed by downloading the website
#搜索匹配特定字符的rpm包
Yum Search Firofox
#搜索包含特定文件的rpm包
Yum provides Firefox
(iii) Yum software source update
Http://mirrors.163.com/.help/centos.html
Software installation methods for CentOS rpm and Yum