---restore content starts---
1. Introduction to package Management
1.1 Source Package
-Script installation package
1.2 Binary package (RPM package, system default package)
-Dependency
2. RPM Command Management (Redhat Package Manager)
2.1 RPM Package Source: RPM package on the system CD/mnt/cdrom/packages
Mount Method:
[Email protected] cdrom]# Mkdir/mnt/cdrom
[Email protected] cdrom]# mount/dev/sr0/mnt/cdrom/
Mount:block Device/dev/sr0 is write-protected, mounting read-only
2.2 RPM Package Naming principle
2.3 RPM Packet Dependency: tree-dependent, ring-dependent, module-dependent (query site: www.rpmfind.net)
2.4 Installation command: [RPM-IVH package full Name] (-i:install,-v:verbose,-h:hash)
2.5 Example: Apache installation package Installation Example:
[Email protected] packages]# RPM-IVH httpd-
httpd-2.2.15-29.el6.centos.i686.rpm
httpd-devel-2.2.15-29.el6.centos.i686.rpm
httpd-manual-2.2.15-29.el6.centos.noarch.rpm
httpd-tools-2.2.15-29.el6.centos.i686.rpm
2.6 Upgrade Command: [RPM-UVH package full Name] (-u:upgrade)
2.7 Uninstall command: [RPM-E package name] (-e:erase)
2.8 Query Command: [RPM-Q package name] (check if package is installed, query)
[RPM-QA Package Name] (query all installed RPM packages, all)
Example: Rpm-qa | grep httpd
[RPM-QI package name] (-I: Query software information information,-p: query for package information not installed)
[RPM-QL Package Name] (query package inside the file installation location,-L: list)
[rpm-qf System file name] (-F: Querying system files for which package filename)
[RPM-QR Package Name] (-r: Query package dependency requires)
2.9 Check command: [rpm-v package name]-v:verify)
2.10 RPM Package File extraction (remediation when system critical commands are lost)
[Rpm2cpio Package Full name | cpio-idv. File absolute Path]
-Rpm2cpio: Convert RPM package to cpio Format command
-Cpio: is a standard tool for creating software archive files and extracting files from files
Example: the treatment after LS failure
Rpm-qf/bin/ls (query which package LS belongs to)
mv/bin/ls/tmp/(cause ls command mistakenly delete illusion)
rpm2cpio/mnt/cdrom/packages/coreutils-8.4-19.el6.i686.rpm | Cpio-idv./bin/ls (extracting the LS command from the RPM package to the current directory under/bin/ls, note that the disc directory cannot be written)
cp/root/bin/ls/bin/(copy ls command to/bin/directory, repair file is missing)
3. Yum Online Management
4. Source Package Management
5. Script installation Package
---restore content ends---
Linux Software Installation Management-CentOS