The software installation of CentOS can be broadly divided into two types:
- [centos]rpm file installation, using RPM directives similar to [Ubuntu]deb file installation, using DPKG instructions
- [Centos]yum installation similar to [Ubuntu]apt-get installation
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 software can be platform compatible
1) Check the software that is already installed in the system
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 Yum1) 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 Upgrade
2) Installation and removal of RPM packages
Yum Remove xxx "service name"
3) information about the Yum cache
Yum Clean
Yum Clean All
4) Package Information query
N: You can use wildcard characters in RPM package names to query similar RPM packages
N: The RPM package that is installed by downloading the website
#列出资源库中所有可以更新的rpm包的信息
#列出已经安装的所有的rpm包的信息
N: Information about the RPM package installed by downloading the website
#搜索匹配特定字符的rpm包
Yum Search Firofox
#搜索包含特定文件的rpm包
Yum provides Firefox
Software installation methods for CentOS rpm and Yum