Linux RPM Package Installation Query uninstall command Summary and Yum command detailed _linux Shell

Source: Internet
Author: User
Tags file size

Previously used Ubuntu, the installation of uninstall software is basically using apt-get this very simple, and the process of software dependencies will automatically help us deal with, similar to the fool-like installation. In addition, in the Linux operating system, almost all software can be installed through RPM, uninstall and management operations. The RPM is all called Redhat Package Manager, which is proposed by the Redhat company to manage software packages under Linux. When Linux is installed, almost all other modules are installed through RPM, except for a few core modules. RPM has five modes of operation: Installation, uninstall, upgrade, query, and authentication.

RPM Installation operation

Command:

Rpm-i The package file name that needs to be installed

Examples are as follows:

Rpm-i example.rpm installation example.rpm package;

Rpm-iv example.rpm installs the example.rpm package and displays the file information that is being installed during the installation process;

RPM-IVH example.rpm installs the example.rpm package and displays the file information and installation progress during installation;

RPM Query Operations

Command:

Rpm-q ...

Additional query commands:

A query for all installed packages The following two additional commands are used to query the installation package information;

I display the installation package information;

L Displays the directories in which all files in the installation package are installed;

s displays all file status in the installation version and which directories are installed; The following two additional commands are used to specify whether the installation package or the installed file should be queried;

P Query is to install the package information;

F query is installed a file information;

Examples are as follows:

Rpm-qa | grep TOMCAT4 See if TOMCAT4 is installed;

RPM-QIP example.rpm View the EXAMPLE.RPM installation package information;

RPM-QIF/BIN/DF View the installation package information of the/BIN/DF file;

RPM-QLF/BIN/DF view the files in the installation package where the/BIN/DF files are installed in each directory;

RPM Uninstall operation

Command:

RPM-E installation packages that need to be uninstalled

Before uninstalling, you usually need to use the rpm-q ... command to identify the installation package name that needs to be uninstalled.

Examples are as follows:

RPM-E TOMCAT4 Uninstall TOMCAT4 Package

RPM Upgrade operation

Command:

Rpm-u packages that need to be upgraded

Examples are as follows:

RPM-UVH example.rpm Upgrade EXAMPLE.RPM Package

RPM Verification operation

Command:

Rpm-v the package that needs to be validated

Examples are as follows:

Rpm-vf/etc/tomcat4/tomcat4.conf

The output information is similar to the following:

S.5 ..... T c/etc/tomcat4/tomcat4.conf

Where S indicates that the file size has been modified, T indicates that the file date has been modified. For more information on verification, please refer to the RPM Help file: Man rpm

Other additional commands for RPM

--force force operation such as mandatory installation and deletion;

--requires shows the dependencies of the package;

--nodeps ignores dependencies and continues operations;

Here is the cloud Habitat Community Small series to give you a detailed introduction to the use of Yum command. So what is Yum? It is the abbreviation of Yellow Dog Updater modified. Its purpose is to solve the RPM package dependencies, user-friendly software installation, deletion, upgrade and so on.
If you are a beginner of Linux, you will be bothered by the installation of the software, even though the RPM package solves a certain level of problem, some of the RPM packages have a very annoying dependency. But Yum, apt and so on some RPM package's management way appears, causes the Linux platform Software installation to become more simple. So what is Yum? It is the abbreviation of Yellow Dog Updater modified. This article will detail how to use the Yum command, and the configuration of the Yum warehouse will be detailed in other technical documentation at the 51 open source site.

The following details the use of the Yum command:

Main parameters:

-Y does not require the user to confirm the action to occur

1. Install and remove software with Yum

Yum will query the database, whether there is this package, if there is, check its dependency conflict, if there is no dependency conflict, download the installation; If so, you 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.
#yum install software name//install the specified package with Yum
#yum Remove software name//delete the specified package with Yum
#yum localinstall RPM Package File//install local RPM package using Yum mode
#yum Groupinstall < Group name >//install all software in a specified group
#yum Groupremove Packagegroup < Group name >//delete all software in the specified group
Note: The difference between install and Localinstall: When using install, the specified packages will be downloaded and installed from the Yum server, while the Localinstall specified software is installed using the RPM package, and the packages required by the dependencies are downloaded at the Yum server.

2. Query software information with Yum

#yum check-update//List of all updatable software
#yum-y Update//upgrade all installed software
#yum-y update < software name >//upgrade of specified packages
#yum upgrade///mass version upgrades, unlike Yum Update, even old obsolete packages are upgraded
#yum groupupdate < Group name >//update packages in the specified software group
#yum info software name//display specified package related information
#yum Info Updates//display all packages that can be updated
#yum Info installed//display information about all installed packages
#yum Info Extras//display package information for all installed but not yum warehouses
#yum GroupInfo < Group name >//display information for a specified group
#yum list//list of all software installed and ready to install
#yum list <regex>//list of available RPM packages that match regular expressions in the repository can be installed or updated and installed
#yum list software name//list the installation of the specified package
#yum list available//list all the RPM packages that can be installed in the repository
#yum list available <regex>//list all available RPM packages that match regular expressions in the repository
#yum listinstalled//List of all installed packages
#yum List installed <regex>//list all installed RPM packages in the repository that match regular expressions
#yum list Extras//list all packages that have been installed but not in Yum warehouses
#yum List Extras <regex>//lists the installed RPM packages that match the regular expression but are not included in the repository
#yum grouplist//Lists all Yum server-defined groupings
#yum Search < keywords >//find specified keywords in yum source
#yum Search <regex>//detect the names, descriptions, overviews, and listed maintainers of all available software, and find the values that match the regular expression
#yum List Recent//list of packages that have recently been added to the repository
#yum provides <regex>//detection packages included in the files and software provided by the function to find a match with the regular expression of the value
#yum Deplist < Package >//Display package dependency information

3. Clear Yum Cache

Yum will store the downloaded packages and headers in the cache and not automatically delete them.
#yum Clean Packages//Clear Cache directory (/var/cache/yum) packages
The headers under the #yum Clean headers//Clear Cache directory (/var/cache/yum)
#yum Clean oldheaders//Clear Cache directory (/var/cache/yum) under the old headers
#yum Clean all//Clear Cache directory (/var/cache/yum) packages and old headers
#yum clean/ditto, clear cache directory (/var/cache/yum) packages and old headers

Yum command usages

1, upgrade the system

#yum Update

2, install the specified package

# yum-y Install VSFTPD

3, upgrade the specified package

# yum-y Update MySQL

4, uninstall the specified package

# yum-y Remore vsftpd MySQL

5, to view the system has been installed and available software groups, for the available software group, you can choose to install

# yum Grouplist

6. Install a software group in the available software group shown in the previous command, the god Editor-emacs, with approximately 12 packages installed

# yum-y Groupinstall Emacs

7. Update the packages in the specified software group

# yum-y Groupupdate Emacs

8, uninstall the software package in the specified group, for Emacs, installed 12 packages installed, but uninstall only 4 software packages uninstall!

# yum-y Groupremove Emacs

9, clear the cache of RPM header files and package files

# Yum Clean All

10, search the relevant software package

# Yum-y Search Emacs

11, display the information of the specified package

# Yum Info Emacs

Similar to the information displayed by Rpm-qi Emacs, but not exactly the same

12, query the specific software package dependency information, Emacs relies on a number of modules Ah

# Yum Deplist Emacs

13. List all packages that start with Yum

# Yum List yum*

14. List the RPM packages that have been installed but not included in the repository

# Yum List Extras

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.