Linux software package management-rpm
/Etc,/bin,/sbin,/lib,/usr/share/man
/Etc,/bin,/sbin,/lib: the program to be used when the system starts. These directories cannot be mounted to additional partitions and must be on the root file system partition.
/Usr/
Bin
Sbin
Lib
Core features of the operating system, which can be partitioned separately
/Usr/local it is recommended to partition separately.
Bin
Sbin
Lib
Etc
Man
/Opt: the default third-party installation location. Most of them are in the/usr/local directory.
/Proc: cannot be partitioned separately. The default value is null.
/Sys: cannot be partitioned separately. The default value is null.
/Dev: device, cannot be separately partitioned
/Var: separate partitions
/Home: separate partitions
/Root: cannot be partitioned separately
/Boot: kernel, initrd (initramfs), which can be partitioned separately
Kernel:
POST --> BIOS (HD) --> (MBR) bootloader (file system structure, ext2, ext3.) --> kernel
Linux Package Manager
1. package it into a file: Binary program, library file, configuration file, and help file
2. Generate a database and track every file installed
Core functions of the software package manager:
1. Create a software package;
2. Installation, uninstallation, upgrade, query, and verification;
RedHat, SUSE, Debian
RedHat, SUSE: RPM
RedHat Package Manager
RPM is Package Manager
Debian: dpt
Dependency:
X --> Y --> Z
Front-End Tool: yum, apt-get
Backend tools: RPM, dpt
Yum: Yellowdog Update Modifier
Rpm command:
Rpm:
Database/var/lib/rpm
Rpmbuild:
Installation, query, uninstallation, upgrade, verification, database reconstruction, and verification data packets;
Rpm Name:
Package: Component
MAIN package:
Bind-9.7.1-1.el5.i586.rpm
Sub-package:
Bind-libs-9.7.1-1.el5.i586.rpm
Bind-utils-9.7.1-1.el5.i586.rpm
Package name format:
Name-version-release.arch.rpm
Bind-major.minor.release-release.arch.rpm
Major version: major improvement
Minor version: A sub-function has undergone major changes
Release number: fixed some bugs and adjusted some features
Bind-9.7.1.tar.gz
Rpm package:
Binary format *
After completing the compilation and configuration, create an rpm package.
Bind-9.7.1-1. [el5.] [x86 | x64 | x86_64 | i686 | noarch]. rpm
Source code format
Rpm:
1. installation:
Rpm-I/PATH/TO/PACKAGE_FILE
-H: displays the progress with #. Each # indicates the progress of 2%;
-V: shows the SLIM process.
-Vv: More detailed process
Rpm-ivh/PATH/TO/PACKAGE_FILE
-- Nodeps: Ignore dependencies;
-- Replacepkgs: reinstall and replace the original installation;
-- Replacefiles: replace a file
-- Oldpackage: downgrade
-- Force: force installation, which can be reinstalled or downgraded
-- Test:
2. Query
Rpm-q PACKAGE_NAME
Rpm-qa: Query all installed packages
Rpm-qi PACKAGE_NAME: queries the description of a specified package;
Rpm-ql PACKAGE_NAME: queries the list of files generated after the specified package is installed;
Rpm-qc PACKAGE_NAME: query the configuration file installed in the specified package;
Rpm-qd PACKAGE_NAME: query the Help file for installing the specified package;
Rpm-q -- scripts PACKAGE_NAME: query scripts contained in a specified package
Rpm-qf/PATH/TO/SOMEFILE: queries the rpm package generated by the specified file;
If an rpm package has not been installed, We need to query its instructions and files generated after installation;
Rpm-qpi/PATH/TO/PACKAGE_FILE
Rpm-qpl/PATH/TO/PACKAGE_FILE: view which files constitute
3. Upgrade
Rpm-Uvh/PATH/TO/NEW_PACKAGE_NAME: if the old version is installed, upgrade it; otherwise, install it;
Rpm-fvl/PATH/TO/NEW_PACKAGE_NAME: if an earlier version is installed, upgrade the version. Otherwise, exit;
-- Oldpaclages: downgrade
4. Uninstall
Rpm-e PACKAGE_NAME
-- Nodeps
5. Verification
Rpm-V PACKAGE_NAME
6. Rebuilding the database
Rpm
-- Rebuilddb
-- Initdb: initializes the database and does not need to be established without guesses;
7. Check the source validity and software package integrity
Encryption type:
Symmetric: the same key is used for encryption and decryption;
Public Key: a pair of keys, public keys, and private keys;
Unidirectional:
Ls/etc/pki/rpm-gpg/
Rpm-K/PATH/TO/PACKAGE_FILE
Dsa and gpg: verify the source validity, that is, verify the signature. You can use -- nosignature to skip this item.
Sha1, md5: verify the integrity of the software package. You can use -- nodigest to skip this item.
Rpm -- import/etc/pki/gpm-gpg/RPM-GPG-KEY-redhat-release: import the KEY file