Package Management:
The compilation of the application's constituent files package one or several package files, so as to quickly and easily implement the package installation, uninstallation, query, upgrade and calibration management operations;
Ways to get Packages
(1) System-issued CD-ROM or official server; CentOS Mirror: http://mirrors.aliyun.comhttp://mirrors.sohu.comhttp://mirrors.163.com (2) Project official site (3) Third-party organizations: Fedora-epel search Engine: http://pkgs.orghttp://rpmfind.nethttp://rpm.pbone.net (4) Make your own
The RPM command management package on the CentOS system:
Functions: Installation, uninstall, upgrade, query, calibration, database maintenance
Installation
Format: rpm-i[option] Package_file option:-I: Indicates install installation-V-VV: Indicates the installation process is displayed, the latter is more detailed;-H: The progress bar format is displayed in the # number; –nodeps: Ignore dependencies –force: Forced action, note that the installation may not run after successful; –test: Test installation, as a test check –nosignature: Not checking the signature is the source of legitimacy; –nodigest: Do not check package integrity; MD5 head;
Upgrade
Format: rpm-u| F[option] Pacage_file option:-u: Indicates whether the software prior to the existence of the upgrade, exist on the upgrade, does not exist on the installation;-F: Indicates that software software exists on the upgrade, how does not exist, to abandon the upgrade;-oldpackage: downgrade if after upgrade If you find a bug or compatibility issue, you can use this option to roll back to the pre-upgrade version;-force: Forced action, note that the installation may not run after the success;-replacepkgs: Note that the configuration file cannot be replaced; Note: (1) do not upgrade to kernel operation, support multi-kernel coexistence, can be installed directly, (2) modified configuration upgrade will not overwrite, upgrade the same new file, will be renamed to File.rpmnew
Inquire:
Format: rpm-q[option] [package-name| Package_file] Options:-qa: Query the system for all installed packages;-qf/path/to/file: The query file is generated by that package,-QL: The file generated by the query program:-QI: Query program property information;-QC: Query program configuration file;-qd: The document provided by the query program-q-whatprovides CAPABILITY (function): Query This CAPABILITY is provided by that program;-q-whatrequires CAPABILITY: Query this Which packages the capability are dependent on;-q-scripts: Query the script generated by the package,-q-changelog: Query the Software History query not installed package information, need to add-P option in conjunction with the above options, the following parameters must be Packag E_file:-qpi: Query The program attribute information of the specified package_file;
Unloading
Format: rpm-e[option] Package-name option:-VH: Show procedure-nodeps: Ignore dependency-noscripts: Ignore script-allmatches: Uninstalls all packages that match the specified name, that is, uninstalling the soft All packages with this name in the name of the file;-test: Test check Uninstall, not true Uninstall Note: Uninstall checks dependencies, if the uninstalled software is dependent on other programs, please uninstall it carefully, otherwise it will not be able to run the dependent program;
Check
How it works: Check the validity and completeness of the package source, in order to check their verification, there must be a verification mechanism, the mechanism is based on signature and encryption implementation, usually the release of the CD will have a file containing all software signatures, the signature is based on the characteristics of the package extracted, Through a single encryption to verify the integrity of the package, if the package is modified in the acquisition, the software package in the system to extract the feature code, and the system has a signature file comparison, different judgment is captured, modified packages, according to the same encryption algorithm extracted features must be different ; The source legitimacy is implemented according to the signature; The code file is called the public key; The checksum is done by the calibration program, which is called when the default RPM command is installed; public key access: Official Website system CD-ROM system configuration file, which is the system public key that the system copies from the installation CD during installation Setup:/etc/pik/rpm-gpg/rpm-gpg-key-centos-7 import public key: Rpm–import/path/to/pub.key checksum software: rpm-v package-name: Verifying the installation file self- After the installation has been modified, according to the PMS record information to judge; Rpm-k Package_file: Manual verification of the specified packages that are not installed;
Database rebuild
Default database directory location:/var/lib/rpm syntax format: rpm–initdb: Initialize database rpm–rebuilddb: Rebuild –dbpath=/path/: Specify database creation location;
Introduction to Linux Package management tools