Parsing Linux application installation and management

A, Linux applications base
1, the relationship between applications and system life
(1) file location
 system command: Usually in / bin and / sbin directory, or from Shell internal instruction
 application: typically in / usr / bin, and / usr / sbin directory
(2) the main purpose
 system commands: to complete the basic management of the system, such as P configuration tools
 application: complete relatively independent of other supporting tasks, such as web browsers
(3) for the environment
 system command: generally only run in the character operator interface
 application: according to actual needs, some programs can be run in a graphical interface
(4) run format
 system commands: general includes a command word, command options and command parameters
 application: typically There is no fixed execution format
2, the directory structure of a typical application
Parsing Linux application installation and management
(1) normal executable files. Typically stored in "/ usr / in" directory, the average user can perform.
(2) server program, file management program. Typically stored in "/ usr / sbin" directory, only the administrator can perform.
(3) configuration file. Typically stored in "/ etc" directory, it will establish the appropriate subdirectories more profiles.
(4) the log files. Typically stored in the "/ var / log" directory
data (5) on application of reference documents. Typically stored in "/ usrr / share / doc / " directory.
(6) executable files and configuration files man page. Typically stored in / usr / share / man / "directory.
3, the common package package type
Parsing Linux application installation and management
two, RPM package management tools
Manager Package Penalty for RPM
 proposed by the company Red Hat, was adopted by many Linux distributions
 establish a unified database file
 detailed records package installation, uninstallation and other change information
 automatic analysis software package dependencies
RPM package
 Software reference material : http://www.rpm.org
l general naming format: bash-4.1.2-15.el64.x86_64.rpm
Parsing Linux application installation and management
Third, the package information inquiries RPM
1, RPM query the installed software information
Parsing Linux application installation and management
common in several sub-options:
(1) -qa: displays the current system, all software installed in RPM list of
Figure we execute "rpm -qa | head-5" to see a list of software first five.
Parsing Linux application installation and management
(2) -qi: Details (--info) View specifying the package name, version, license agreement, use descriptions, etc.
as shown in the implementation of our software before viewing software on the basis of a list of the "rpm -qi + any one package name "command to view its details.
Parsing Linux application installation and management
(3) -q1: Show all categories specified package is installed in the current system, the file list (--list)
as shown we execute "rpm -ql + package name" command to display the current package directory information used in the system is installed.
Parsing Linux application installation and management
(4) -qf: View the specified file or directory which package is installed (--file)
as shown we execute "rpm -qf / usr / bin / vim" command to view the list of all the vim package Installed.
Parsing Linux application installation and management
(5) -qc: View the package configuration file
Figure we execute "rpm -qc + package name" command to view the package configuration file.
Parsing Linux application installation and management
(6) -qd: View Pack documentation manual
as shown we execute "rpm -qd + package name" command to view this package documentation manuals.
Parsing Linux application installation and management
2, the query RPM package file is not installed information
Parsing Linux application installation and management
commonly used words Options: "- qpi, -qpl, -qpc , -qpd", the use of these sub-options like the above method of operation.
Fourth, install, upgrade, uninstall the RPM package
1, install or upgrade RPM packages
Parsing Linux application installation and management
(1) -i: installed in the current system (Install) a new RPM package.
(2) -e: Uninstall the package specified name.
(3) -U: Check and upgrade the system in a package, if the package had not previously been installed, equivalent to the "-i" option.
(4) -F: review and update of a package system, if the package had not previously been installed, abort the installation. There are several related command options can be used to assist in the installation, the uninstall process packages.
(5) - force: force the installation of a software package, and the package when the need to replace existing installed files, or install an older version of software than the current use of the software, you can use this option.
(6) - nodeps: When you install or upgrade, uninstall a software package that does not check dependencies on other packages.
(7) -h: During installation or upgrade packages, the "#" sign shows the installation progress.
(8) -v: show details of the software installation process.
Fifth, maintain RPM database
1, rebuilding the RPM database
Parsing Linux application installation and management
For recording Linux system to install, uninstall, update information on the application by RPM package management system automatically maintained, generally does not require user intervention. When the RPM database is damaged (accidentally deleted files, illegal shutdown, virus damage as a result), and the Linux system can not automatically complete the repair will result in not properly installed using the rpm command, unloading and query software package. Then you can use the rpm command "--rebuilddb or" -initdb- "function of the RPM database rebuild.
2, importing the public key to verify
Parsing Linux application installation and management
six resolve package dependencies method
1, equipped with multiple software dependencies
 is dependent packages need to be installed
 can specify multiple rpm package file to install the same time
2, uninstall the dependencies of multiple software
 rely on other packages need to uninstall the program
 can specify multiple names uninstall the software at the same time
3, ignoring dependencies
 combination nodeps "option, but it may cause the software anomaly
seven source code is compiled
advantage  use the source code to install the software
 access to the latest software version, timely repair bug
 according to user needs, the flexibility to customize the software function
 application occasions example
 when you install a newer version of the application
 the current installed programs can not meet the needs
 need to add new functionality to the application
eight, compile and install the source code package
Parsing Linux application installation and management
nine, compile and install process
Parsing Linux application installation and management
the latter will be some manual translation of documents , when invited to join in Oh, thank you!

Guess you like

Origin blog.51cto.com/14449521/2429930