How to install software on rpm and yum in CentOS
Centos software installation can be divided into two types:
12
[Centos] rpm file installation, using the rpm Command similar to the [ubuntu] deb File Installation, using the dpkg command
[Centos] install yum similar to [ubuntu] apt-
get
Install
Rpm command
(1) Querying System for Installed Software Information
12
For an rpm package
"-"
And
"."
Consists of the following components: * package name *
Version Information * release version * indicates that the platform is compatible with the platform when noarch occurs.
1) Check the software installed in the query system.
rpm -qa
2) query the software package of an installed file;
Absolute path of rpm-qf file name
3) query where all installed software packages are installed;
The software name is defined as: the rpm package removes the platform information and suffix Information
Rpm-ql software name
4) query the information of an installed software package
Rpm-qi software name
5) Check the configuration file of the installed software;
Rpm-qc software name
6) view the installation location of a software installation document:
Rpm-qd software name
7) Check the software packages and files on which the software is installed;
Rpm-qR software name
(2) querying information about uninstalled software packages
1) view the purpose and version of a software package;
Rpm-qpi rpm file
2) view the files contained in a software package;
Rpm-qpl rpm file
3) view the document location of the software package;
Rpm-qpd rpm file
4) view the configuration file of a software package;
Rpm-qpc rpm file
5) view the dependency of a software package
Rpm-qpR rpm file
(3) installation, upgrade, and deletion of software packages
1) install or upgrade an rpm package
Rpm-ivh rpm file [install] rpm-Uvh rpm file [update]
2) delete an rpm package
Rpm-e Software name
How to forcibly Delete the software regardless of the dependency, add -- nodeps after the above command
(4) signature Import
Rpm -- import signature file rpm -- import RPM-GPG-KEY
Yum command
(1) Basic concepts of yum 1) What is yum?
Yum = Yellow dog Updater. Modified is mainly used to conveniently Add/delete/update RPM packages. It can automatically solve the dependency problem of packages and facilitate management of a large number of system updates.
2) yum features
You can configure a simple configuration file (/etc/yum. conf) for multiple resource libraries (Repository) at the same time to automatically solve the dependency problems encountered when adding or deleting an rpm package. This makes it easy to maintain consistency with the RPM database.
3) install yum
CentOS comes with (yum-*. noarch. rpm) # rpm-ivh yum-*. noarch. rpm first needs to import the RPM-GPG-KEY of the system before enabling yum for the first time:
(2) Use of yum commands
When you use the yum management software for the first time, yum automatically downloads the required headers and stores them in the/var/cache/yum directory;
1) Update the rpm package
# Check the available software packages yum check-update # update all software packages yum update # update specific software packages yum update kernel # large-scale upgrade yum upgrade
2) Installation and deletion of rpm packages
# Install and delete the rpm package yum install xxx [service name] yum remove xxx [service name]
3) yum cache-related information
# Clear cache rpm package file yum clean packages # Clear cache rpm header file yum clean headers # Clear cache old header file yum clean old headers # Clear cache old rpm header file and package file yum clean all
4) query software package information
# List all rpm packages that can be installed or updated in the resource library yum list # list specific rpm packages that can be installed or updated and installed yum list firfox * N in the resource library: you can use wildcards in the rpm package name, query similar rpm packages # list all the rpm packages that can be updated in the resource library yum list updates # list all installed rpm packages yum list installed # list installed but not included in the resource library rpm package yum list extras N: download and install the rpm package through the website. # The rpm package information is displayed (the info parameter is the same as the list ), list information about all rpm packages that can be installed or updated in the resource library yum info # list the specific information about the rpm packages that can be installed or updated in the resource library yum info firefox * N: you can use a match in the rpm package name # list information about all the rpm packages that can be updated in the resource library yum info updates # list information about all the rpm packages that have been installed yum info installed # list yum info extras N: download and install the rpm package through the website. # search for an rpm package that matches a specific character. yum search firofox # search for an rpm package containing a specific file. yum provides firefox
(3) yum software source update
Http://mirrors.163.com/.help/centos.html