Linux - (Chapter 11) Software Package Management

Table of contents

1. RPM

1 Overview

2.RPM query command

3.RPM uninstall command

4.RPM installation command

2. YUM

1 Overview

2.YUM common commands


1. RPM

1 Overview

        RPM (RedHat Package Manager), a RedHat software package management tool, is similar to setup.exe in Windows. It is a packaging and installation tool in the Linux series of operating systems. Although it is the logo of RedHat, the concept is universal.
RPM package name format
Apache-1.3.23-11.i386.rpm
  • - "apache" software name
  • - "1.3.23-11" software version number, major version and this version
  • - "i386" is the hardware platform on which the software runs, the collective name for Intel 32-bit processors
  • - "rpm" file extension, which stands for RPM package

2.RPM query command

rpm   -qa        // Query all installed rpm packages

Since there are many software packages, filtering is generally used. rpm -qa | grep package

for example:

        Check the installation status of firefox software:

        rpm -qa | grep firefox

else

3.RPM uninstall command

rpm -e RPM package

rpm -e --nodeps package

Option description

Options Function
-e Uninstall a package
--nodeps When uninstalling a package, dependencies are not checked.

        If other packages depend on the package to be uninstalled, an error message will be generated during uninstallation. If you want to delete this package, you can add the parameter --nodeps to force the deletion. However, this is generally not recommended because programs that rely on this package will not work properly after this.

4.RPM installation command

rpm -ivh RPM package full name

Option description

Options Function
-i install, install
-v --verbose, show detailed information
-h --hash, progress bar
--nodeps Dependencies are not checked before installation

2. YUM

1 Overview

        YUM (full name: Yellow dog Updater, Modified) is a software for Fedora, RedHat and CentOS.
Shell front-end package manager in . Based on RPM package management, it can automatically download RPM packages from designated servers.
And installation can automatically handle dependencies and install all dependent software packages at once, without having to go through the tedious process
download and install.

2.YUM common commands

yum [options] [parameters]

Option description

Options Function
-y Answer "yes" to all questions

Parameter Description

parameter Function
install Install rpm package
update Update rpm package
check-update Check if there is an updated rpm package available
remove Delete the specified rpm package
list  Show package information
clean Clean yum expired cache
deplet Show all dependencies of yum package

Guess you like

Origin blog.csdn.net/m0_45447650/article/details/131984282