Linux basics-linux software management RPM
Because the basics of linux are explained based on CentOS, it is about the software package management on CentOS. Ubuntu software package management includes: ubuntu software package management, package management guide, and ubuntu software package management.
Linux software management: RPM software package management source code form the vast majority of open source software are directly released in the form of source code
The source code is usually packaged into an archive compressed file of tar.gz.
The program source code must be manually compiled into binary form before it can be run and used.
Basic source code compilation process:
1./configure check the compiling environment, related library files, configuration parameters, and generate makefile
2. make compiles the source code to generate an executable file.
3 make install the generated executable file to the current computer
Software in the form of source code is troublesome to use, but it has good compatibility and controllability.
Open-source software generally uses a lot of functions of other open-source software, so open-source software has a lot of dependencies (to use a software, you need to install other software first)
Disadvantages of RPM source code: complicated operations, long Compilation Time, and easy errors
Advantages of source code: applicable to all systems and customizable
For ease of use, Eric Troan developed the RPM (reahat Package Manager)
By compiling the source code based on a specific platform system as an executable file, RPM saves dependencies to simplify the installation and management of open-source software.
The RPM design goals are as follows:
Easy to use
Use a single package format file to publish (. rpm file)
Upgradable
Tracing software Dependencies
Basic Information Query
Software Verification
Support for multiple platforms
Naming rules for RPMRPM software packages
Softname-version Number-software platform. rpm
RPM basic commands:
Install software: rpm-I software. rpm
Uninstall software: rpm-e software
Upgrade form installation: rpm-U software-new.rpm
RPM supports software installation through http and ftp protocols:
Rpm-ivh http://www.linuxcast.net/software.rpm
You can add the following parameters:
-V: Show Details
-H: display progress bar
The RPM query saves a lot of information about the software. You can run the following command to query the software:
Rpm-qa list all installed rpm Software
Run the rpm-qf filename command to query which rpm package the target file belongs.
Rpm-qi packagename: query the information of the specified rpm software installed
Run the rpm-ql packagename command to query files contained in the specified rpm software.
Rpm-qip software. rpm query rpm file information
Rpm-qlp software. rpm query the files contained in the rpm file
RPM verification software may be maliciously modified during the propagation process. Therefore, for the sake of security, modern systems have added verification functions for the software.
Asymmetric encryption algorithms are generally used for verification. Therefore, a key is required.
Import key:
Rpm -- import RPM-GPC-KEY-CentOS-6
Verify rpm files
Rpm-K software. rpm
Verify installed software
Rpm-V software. rpm