The basic knowledge of package management for---------Linux

Source: Internet
Author: User

The kernel does not provide specific functionality: functions are provided by the program


Format of the program, ABI

Windows:exe

Linux:elf


The process of compiling the program:

SOURCE program---compile----assembly--------------Link

Compile the classification:

Static compilation: Compiling libraries that are dependent on the program runtime into the program

Dynamic compilation: After compiling, you need to link the library, and when the program runs, find the shared library based on the link


Program runs across platforms

1, library virtualization, virtual out of the corresponding platform of the library and Abi; The program runs on top of the library

1), Linux running wine program, you can virtual out of the Linux program to run the library and ABI dependent. Windows programs can run across platforms.

2), running the Cywins program on Windows, you can virtual out of the library and ABI on which the Windows program is running. Linux programs can run across platforms.

3), unstable


2. Java Virtual machine: Do not consider dependent libraries and ABI (Sun,c language development, development environment JDK, run environment Jvm,javac compiler, Java Environment Memory monitor); The program runs on top of the JVM

C Writing program, call C library, source code level compatible, can be compiled on any platform of the corresponding platform JAVA,JDK,JVM

1), Java programs developed in JKD, regardless of the platform, no longer consider the system-level libraries, only need the JVM to run.

2), stable


Andoriod = Linux + BusyBox + JVM


Writing Program-oriented objects

1) application level: Java language (JDK), Go,python (Unified interface, stable, concise), Php,perl (flexible)

2) system level: Syscall,libcall

3) Hardware specifications: Binary, microcode programming, advanced language


The composition and function of the program

Binary format programs, libraries, configuration files, help manuals

Profiles: Enabling or turning off certain feature features

Library: Two development interfaces available

Help Manual: User manual for Commands

Program:/bin,/sbin,/usr/sbin,/usr/bin

Library:/lib,/lib64,/usr/lib,/usr/lib64

Configuration file:/etc

Help Manual:/usr/share/man


Package Manager

Function: Package The components of the program into a whole, so as to facilitate: installation, query, uninstall, check, upgrade.


Classification of Package Manager

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9E/67/wKioL1mRc2rzpwBOAAAls33JMfw509.png "title=" program. PNG "alt=" Wkiol1mrc2rzpwboaaals33jmfw509.png "/>

Red Hat

1) Source code Package command: name-version.tar.gz

Version:major.minor.release

Major: Trunk branch: Function mega-change

Minor: Add branch, modify function

release: Fix a bug

2) RPM package naming

Source code: Name-version-release (RPM package). Operating system platform. SRC.RPM

Binary : name-version-release. Operating system platform. CPU platform. RPM

Operating system platform: EL5,EL6,EL7, ...

CPU Platforms: x86:i386,i486, i586, i686 for newer platforms, backwards compatible

x86_64/x64/amd64:64bitCPU from the first 32bit platform or x86 platform is developed by AMD. Technology-focused platform called AMD64


3) package split: Different users with the RPM package function range is not the same, for only a small number of users, install the entire RPM package, wasted space, and no use. There is a need to split the function: Trunk Package and Support package

Trunk Package: The main function of the package: Name-version-release. operating system platform. CPU platform. RPM

Support Packages/Packages/subcontracting: Additional features of the package: name-devel-version-release. Operating system platform. CPU platform. RPM


4) dependencies between packages: When you install a package, you must install the backbone package before you can install the package.


Front-end management tools

The dependency of a package in a remote or local repository is extracted and placed in a local metadata directory path, and each time it is installed, the checksum of the package in the warehouse is checked, and if there is no change, the dependency of the local package is analyzed. If it changes, regain the dependency of the package in the corresponding warehouse.

1. Ways to get RPM packages

1. System release Disc Tsinghua University: mirror.tuna.tsinghua.edu.cn Huazhong University of Science and Technology: MIRRORS.HUST.EDU.CNMIRRORS.ALIYUN.COMMIRRORS.SOHU.COMMIRRORS.163.COM2, project official Site 3, third-party organization priority: Fedora-epel/HTTP download.fedoraproject.org/pub/epel/search engine: Http://pkgs.orghttp://rpmfind.org4, own production 1) get the official source code 2) write SPARC files

2. Use of RPM commands

1) Installation

2) query

3) Uninstall

4) Verification: source legality, completeness

5) Upgrade

6) database


SOURCE legitimacy: The package author is a third party organization we recognize (verified by the other's public key)

Completeness: Additional content added to the package without the creator


Add:

1. View the library files that the program depends on

LDD FILE ...

Using the example

1. Get the path of the command [[email protected] ~]# which--skip-alias ls/usr/sbin/ls2, get command dependent shared library file [[email protected] ~]# ldd/bin/lslinux- Vdso.so.1 = (0x00007ffd021f3000) # # library Entry Libselinux.so.1 =/lib64/libselinux.so.1 (0x00007f614409b000) dependent Shared library Name (16 binary indicates which address space the library is mounted in in the current memory)

2. Display or configure the library that is loaded in the system memory, the library mapping relationship Path

Ldconfig [Options ...]-p,--print-cache print buffer 1, mapping the library Ldconfig file 2, configuration file/etc/ld.so.conf.d/*.conf/etc/ld.so.conf 3. Generate the cached file path/etc/ld.so.cache


This article is from the "Reading" blog, make sure to keep this source http://sonlich.blog.51cto.com/12825953/1956235

The basic knowledge of package management for---------Linux

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.