Linuxthe software package managementRpm,YumBasic Use
First, RPM
RPM is an abbreviation for the Redhat Package Manager (Redhat Packages management tool), although the file format name is Redhat, but its original design concept is open and now includes OpenLinux, S.U.S.E, as well as distributed versions of Linux such as Turbolinux, can be regarded as an industry standard.
RPM The main function is to easily manage the installation, upgrade, uninstallation, verification and query of software packages with the. rpm suffix in Linux.
1 , install packages, and common options
rpm {-i|--install} [Install-options]package_file ...
- V: Print details-usually regular progress messages are displayed. You can also use-VV,-VVV to display more detailed information.
- H: the package that prints the 50 hash flag opens the archive. Typically used with-V
--replacepkgs : Reinstall
--nodeps: Ignore dependencies
--test: test the installation without performing a real installation process
For example, to install A2PS-4.14-10.1.EL6.I686.RPM, execute the Install command:
RPM–IVH a2ps-4.14-10.1.el6.i686.rpm
2 , upgrade packages, and common options
RPM {-u|--upgrade} [Install-options]package_file ...
Indicates that an upgrade is installed if an older version of the package is available, otherwise the installation action is performed
RPM {-f|--freshen} [Install-options]package_file ...
Indicates an upgrade installation if an older version of the package is available, otherwise abort the installation operation
- V: Print details-usually regular progress messages are displayed. You can also use-VV,-VVV to display more detailed information.
- H: the package that prints the 50 hash flag opens the archive. Typically used with-V
--oldpackage : Downgrade installation
--force: ignore conflicts, enforce procedures
Note: Do not upgrade the kernel package, Linux supports multi-version kernel coexistence, therefore, the new version of the kernel can be installed directly, if the original package configuration file has been modified, when the upgrade, the new version of the file will not directly overwrite the old version of the file, but the new version of the file to re-kill ( Plus suffix. rpmnew) name reserved
3 , uninstall packages, and common options
Rpm-e package_name ...
--nodeps: Ignore dependencies
--test: Uninstall Test
Note: If the package configuration file has been modified since it was uninstalled, the file will not be deleted, but is renamed (the original file plus the. rpmsave suffix) and reserved
4 , query packages, and common options
Rpm{-q|--query} [Select-options] [query-options]
[Select-options]:
rpm-q package_name ... query whether a package is installed
Rpm-qa querying all packages that have been installed
Rpm-qf/path/to/somefile query which package the file is generated by:
RPM-QPL Package_file or
Rpm-qpi Package_file query For information about packages that have not been installed
[Query-options]
Rpm-qi package_name Query Brief description information for a package
RPM-QL package_name querying a list of all files generated after a package is installed
RPM-QC package_name querying a list of all profiles generated after a package is installed
RPM-QD package_name querying a list of all help files generated after a package is installed
rpm-q--changelog package_name Query the Changelog list information that changes with the version when a RPM package is made
rpm-q--provides package_name querying the capabilities provided by a package
rpm-q--requires package_name querying the capabilities on which a package depends
rpm-q–scripts Query the script when loading and unloading a package
5 , verifying packages and common options
1 , rpm-v package_name Check if the package file has changed after installation
2 , Rpm-k package_file package source legality and completeness, before checking, we need to import key:rpm--import PubKey
--nosignature: do not check source legitimacy
--nodigest: do not check integrity
Second, YUM
Yum(full name Yellow dog Updater, Modified) is a shell front-end package manager in Fedora and Redhat as well as SuSE and CentOS. Based on RPM package management, the ability to automatically download RPM packages from specified servers and install them automatically handles dependency relationships and installs all dependent packages at once, without the hassle of downloading and installing them over and over again . Yum provides commands to find, install, and delete one, a group, or even all of the packages, and the commands are concise and well-remembered.
Yum The general usage is as follows: Yum [options] [command] [package ...]
1. Install packages
Yum Install package_name Install packages
Yum Reinstall Package_name Reinstall Package
Plus-y indicates that all selections are yes during installation
2. Upgrade Packages
Yum Update package_name
Yum downgrade package_name Downgrade installation
3. Uninstalling Packages
Yum Erase|remove package_name
4. Query Package
Yum List all List Packages
Yum Info package_name brief information about the query package
Yum Search KEYWORD: contains a related list of this keyword based on the keyword Fuzzy query package name or package sumary information
Yum Provides|whatprovides/path/to/somefile which package the query file is provided by
5. Package Group Management
Yum grouplist Show all package groups
Yum groupinfo "Group_name" to display information about a package group
Yum Groupinstall "Group_name" Install package Group
Yum groupremove "Group_name" Uninstalling a package group
Yum groupupdate "Group_name" Upgrade Package Groups
6. Other common commands
Yum repolist list all available Yum sources
Yum Clean All Clear All caches
Linux package management rpm, yum basic usage