Linux application basics and RPM management tools explained

Linux application basics

1: The relationship between application and system commands

Insert picture description here

2: Directory structure of a typical application

Insert picture description here

3: Common package packaging types

Insert picture description here

RPM package management tool

■Red-Hat Package Manager
●Proposed by Red Hat, adopted by many Linux distributions
●Establishing a unified database file
●Detailed record of software package installation, uninstallation and other change information
●Automatic analysis of software package dependencies
■RPM software package
●Software Material reference: htp://www.rpm.org

-General naming format: bash-4.1.2-15.el6_ 4.x86 64.rpm

Format of rpm command

■The rpm command can realize almost all management functions of the RPM software package
■Execute the "man rpm" command to get detailed help
information about the rpm command
rpm command function
●Query and verify the relevant information of the RPM software package
installation, upgrade, uninstall RPM software package
●Maintain RPM database information and other comprehensive management operations

q: Use the query mode. When encountering any problems, the rpm command will first ask the user;
-R: display the association information of the package;
-s: display the file status, this parameter needs to be used with the "-1" parameter;
-U <package file> or --upgrade <package file>: upgrade the specified package file;
-v: display the command execution process;
Fvv: display the command execution process in detail for easy troubleshooting.
rpm -qa displays the names of all installed programs
rpm -qi program name
displays the detailed information of the installed programs
rpm -q1 program name
displays the file list of the installed programs _
rpm -qf program name
queries which installation package the installed program belongs to
rpm
qc program name
lists the configuration files of the installed program
rpm -qd program name
lists the location of the package documentation of the installed program
rpm -qR program name lists the dependent software packages and files of the installed program
rpm
-qpi program name Show the detailed information of the uninstalled program
rpm-qp1 program name show the file list of the
uninstalled program rpm -qpf program name show which program the
uninstalled program belongs to rpm -qpc program name show the configuration file of the
uninstalled program ypm-qpd The program name shows the location of the package documentation for the program that is not installed

Install, upgrade, uninstall RPM packages

■Install or upgrade RPM software
rpm [Options] RPM package files
...
●Common options
◆-i, -U, -F
■Uninstall the specified RPM software
rpm -e software name
■Auxiliary options
◆–force, –nodeps, -h, -V

Maintain RPM database

■Rebuild the RPM database

[root@localhost ~]# rpm --rebuilddb

or

[root@localhost ~]# rpm -initdb

■Import verification public key

[root@localhost ~]# rpm -import /media/cdrom/RPM-GPG-KEY-CentOS-7

Solving package dependencies method

■When installing multiple software with dependencies
●The dependent software package needs to be installed first
●You can specify multiple .rpm package files to install at the same time
■When uninstalling multiple software with
dependencies ●Packages that depend on other programs need to be installed first Uninstallation
●Can be uninstalled by specifying multiple software names at the same time
■Ignore dependencies
●Combined with "–nodeps" option, but may cause software abnormalities

Guess you like

Origin blog.csdn.net/Houtieyu/article/details/108003153