Linux Package Management

Source: Internet
Author: User

One:

1. API and Abi

Api:application Programming Interface

Application Programming Interface

Program Source--preprocessing----compile-to-link

Abi:application Binary Interface

Application Binary Interface

Windows is incompatible with Linux

Library-level Virtualization

Linux:wine

Windows:cywin

2. Components of binary applications:

binary files, library files, configuration files, Help files

Package Manager:

Debian:deb-->apt

redhat:rpm-->rpm

Gentoo:emerge Portage

Archlinux:pacman

Suse:zypper

Fedora 22+:DNF

3. View the library files that the binaries depend on:

Ldd/path/to/binary_file

4. Manage and view native loaded library files

Ldconfig

/sbin/ldconfig-p//Display native cached available library files and file mappings

Configuration file:/etc/ld.so.conf

/etc/ld.so.conf.d/*.conf

Cache files:/etc/ld.so.cache

5, package management;

Function: To package the edited application's constituent files into one or several package files;

So as to quickly complete installation, uninstall, query, upgrade, etc.

(1) The constituent list of the program-----each package is unique

List of documents

Scripts to run when installing and uninstalling

(2), database----public-----

Package Name and version

Dependent relationships

Function description

File path and checksum information for each file generated by the installation

6. How to manage Packages:

Using Package Manager: RPM

Using the front-end tools: Yum, DNF

7. Ways to get Packages:

(1) The System release CD or the official server:

CentOS Image:

http://mirrors.aliyum.com

Http://mirrors.sohu.com

Http://mirrors.163.com

(2) Official site of the project

(3) Third party organizations:

Fedora-epel

Search engine:

http://pkgs.org

Http://rpmfind.net

Http://rpm.pbone.net

(4) Make your own

Note: Check legality-----> source Legality, Package integrity

Two: RPM Package management commands

----implementation of installation, uninstallation, upgrade, query, checksum, database maintenance

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/> rpm {-i |--install} [install-opt Ions] package_file ...

-v:verbose

-H: Show packages to manage execution progress; Each # represents 2% progress

RPM-IVH Package_file ...

[Install-options]

--test: Tests the installation, but does not actually perform the installation process.

--nodeps: Ignores dependencies.

--replacepkgs: Reinstall

--nodigest: Does not check package source legitimacy

--nosignature: Package integrity is not checked

--noscipts:

%pre: Pre-installation script

%post: Post-installation script

%prenu: Pre-uninstall script

%postun: Post-uninstallation script

Upgrade:

RPM {-u|--upgrade}[install-option] Package_file

RPM {-f|--freshen}[install-options] package_file650) this.width=650; "Src="/e/u261/themes/default/images/ Spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid # DDD; "alt=" Spacer.gif "/>

RPM-UVH Package_file ...

RPM-FVH Package_file ...

--oldpackage: Downgrade

--force: Forced escalation

Attention:

(1) Do not upgrade the kernel, Linux supports multi-core version coexistence.

(2) If the original package configuration file has been modified after installation, the new configuration will not overwrite but rename the reservation (. rpmnew)

Inquire:

RPM {-q|--query} [select-options][query-options] 650) this.width=650; "Src="/e/u261/themes/default/images/ Spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid # DDD; "alt=" Spacer.gif "/>

[Select-options]

-A: All packages

-F: The query command is generated by that package installation.

-p/path/package_file: Query operation for package installation files that are not installed

--whatprovides CAPABILITY: Query The specified CAPABILITY is provided by that package

--whatrequires CAPABILITY: Query The specified CAPABILITY is dependent on the package

[Query-options]

--changelog: Query rpm Package for Changelog

-C: Querying the program's configuration file

-D: Documentation

-I: Package description information

-L: View all files that were generated after the package was installed.

--scripts: A script fragment that comes with the package.

-r: Query the capability that the package depends on

--provides: Lists the capability provided by the specified package

Check:

RPM {-v|--verify} [select-options][verify-options]

S File size differs

M mode differs (includes permissions and file type)

5 Digest (formerly MD5 sum) differs

D Device Major/minor number mismatch

L Readlink (2) path mismatch

U user ownership differs

G Group ownership differs

T Mtime differs

P capabilities differ

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>

Validation of package source legitimacy and integrity verification

Integrity Verification: sha256

SOURCE Legitimacy verification: RSA 650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" border:1px solid RG B (221,221,221); background-position:50% 50%;background-repeat:no-repeat; "alt=" Spacer.gif "/>

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>


This article is from the "86962983" blog, please be sure to keep this source http://wangzenghui.blog.51cto.com/9702487/1689927

Linux Package Management

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.