Package Management
includes : kernel management, process management, memory management, network protocol, driver package management
Package Manager: Packaging, package management (install, upgrade, uninstall, query and checksum)
Two package management Deb, RPM Redhat Package Manager Pack Management
1.1 Components of the package:
Binary program:/bin,/sbin/,/usr/bin,/usr/sbin
Library files:/lib64,/usr/lib64
Configuration file:/etc/
Help Group Documentation: Manual,info
1.2 Package Manager
Packaging: A single archive file
Install, Uninstall, upgrade
Checksum: Two management, the legitimacy of the source, completeness.
The command mechanism for RPM packages
Package name + major version number. minor version number. backup Version base-4.3.4.tar.gz 4.3.2.
The name of each RPM package consists of-and. are divided into several parts. Take "abrt-cli-2.0.8-15.el6.centos.i686.rpm" this package to explain, "ABRT-CLI" for the package name, "2.0.8" is the version information, "15.el6.centos" for the release version number, "i686" To run the platform. Among the common running platforms are i386, i586, i686, x86_64, which require you to note that the CPU is currently divided into 32-bit and 64-bit, i386,i586 and i686 are 32-bit platforms, and x86_64 represents 64-bit platforms. In addition, some RPM packages do not write specific platforms but Noarch, which means that the RPM package does not have a hardware platform limit.
1.3 RPM Tool
RPM is an abbreviation for Redhat Package Manager. RPM is a database record way to install the packages you need into a set of hypervisor for your Linux hosts. Also, there is a database storage mechanism in your Linux that records the dependencies of packages. It will be quick to install. There are also drawbacks: the pre-compiled package environment of RPM must be consistent with the build environment of the package at the time of installation, the package must be unloaded when it is uninstalled, and if the dependent package is required by the system, it cannot be uninstalled. Failure to do so causes the system to crash. RPM Database storage path:/var/lib/rpm.
1.4 How to get the RPM package:
1: Package provided by the release version.
2:fedora-epel High-quality software sources.
3: The official site of the project.
4: Search engine:http://rpmfind.net
Http://rpm.pbone.net
http://pkgs.org
Device files for the CentOS identification disc:/dev/cdrom,
1.5 Implement package management based on RPM command:
Installation:
RPM {I|--install}[install-options] package_file ...
-I.
-V: Displays detailed procedures for the installation.
-H: Displays the progress of the installation.
--nodeps: Ignores dependencies.
--replacepkgs: Reload Package.
--force: Forced installation.
The Mount command is mount/dev/cdrom/mnt/because the CD file is mounted to the/mnt/directory
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/3D/wKioL1X4MEXDlBHYAAEhZm8Z48Q460.jpg "title=" 9A5BRVT_P4 (1rvm$qq55lmo.png "alt=" Wkiol1x4mexdlbhyaaehzm8z48q460.jpg "/>
Upgrade:
RPM {-u|--upgrade}[install-options] Package:
-UVH: If there is an old package, upgrade it, or install if it is not.
-FVH: If there is an older package, the upgrade is not installed.
-nodeps: Ignores dependencies.
--oldpackage: Downgrade, down to the old version.
Unloading:
RPM {-E |--erase}[--nodeps][--noscripts][--notriggers][--test] Package_name
Query: RPM {-q|--query}[select-options][query-options]
Query options
-QA: Query the system has installed all the packages;
-qf:/path/to/somefile query the files generated here are generated by that package file installation;
-QC: query Specifies the configuration file that the package installation generates.
-QD: Queries the specified package to install the generated document;
-qi: Query the first-pass information of the specified package;
-QL: A list of all files generated by the query program installation;
-Q--scripts: Query the relevant script for the package;
Preinstall: Pre-installation scripts
Postinstall: Post-installation script
Preuninstall: Pre-uninstall script;
Postuninstall: Post-uninstallation script;
-P: Query against the package files that are not installed;
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/40/wKiom1X4NOOBERZwAAKKNtiIAbo912.jpg "title=" 9cb20m {d1g{$60v{f23qapo.png "alt=" Wkiom1x4nooberzwaakkntiiabo912.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/73/40/wKiom1X4NsuA3LDsAABn9aQgWeI991.jpg "title=" ez${ Kg4l8sa4gw6osy1jj{k.png "alt=" Wkiom1x4nsua3ldsaabn9aqgwei991.jpg "/>
Package Check
RPM {-v|--verify}[select--options][verfy--options]
Legitimacy verification of Source: asymmetric encryption; integrity verification: one-way encryption; Import Key: RPM--import/path/key_file
Yum Tools Management Pack Yellow Updateer modified
Yum repositories
File server: Ftp://hostname/path/repo (FTP repository)
Http://hostname/path/repo (online warehouse)
File:///path/repo (Local warehouse)
Yum configuration file:
/ETC/YUM.CONF: Defines a global configuration that is applicable to all warehouses.
/etc/yum.repos.d/*.repo: A file is typically used for one or a set of similar or related warehouses
Define a point for a warehouse:
[REPO_ID]
Name=
Baseurl=
#mirrorlist =scheme://hostname/path/....mirror
Enabled={1|0}
gpgkey=
cost=
Define the warehouse to point to the available variables:
$releaserver: Reference the major version number of the current system;
$basearch: The basic architecture of the current system;
i386,i486,i586, i686
http://mirrors.magedu.com/CentOS/$releasever/os/$basearch
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/3D/wKioL1X4QPjBmarpAAHm2rJIWTs419.jpg "title=" sha% Tyihr$n1iei] (65mtn2.png "alt=" wkiol1x4qpjbmarpaahm2rjiwts419.jpg "/> [Base]: Represents the warehouse name, name: the memo on behalf of the warehouse. Mirrorlist: Lists the available use mirror sites.
BaseURL: The mirror site that the warehouse points to. Enable=1: On behalf of the warehouse start, 0 off; Gpgcheck=1: whether to check the RPM file digital certificate; Gpgkey: Digital certificate public key is located
CentOS Package Management