Linux Package Management:
Application:
GPL: Source Code,
Posix:portable Operatin System
API: Compatible, which means the library is compatible, so the source code can be cross-platform
ABI: Compatible, the compiled program can be cross-platform;
Different platforms can have different binary format, so the same program will not work on different platforms.
Libraries: executable programs, which themselves cannot be used as a program execution portal, but can be called
Compiled binary format
Programs: precompiling, compiling, compiling, linking
Static:
Dynamic Link: DLL (Windows),
Under Linux, so (Shared object), in the Lib and USR directories
Compiling: Source code-->CPU instruction set
Operating system version, such as operating system support x86 CPU, the operating system can only be installed on the CPU machine, need to meet the requirements of the hardware platform;
Example:
There are two machines, both A and B, are CENTOS6, and glibc are the same, the program on a machine is not necessarily run on B, because if A and B CPU different, then the CPU instruction set is not the same, the compiled program is different, that is, the binary execution program format is different. Compile is to translate the source program into a CPU instruction set, so the CPU hardware platform is different, the compiled program can not cross the platform!!
OS, CPU
Note: 1, OS platform: The application must be a supported version of a specific platform, the same library can be called to cross.
2, hardware platform: The application must be supported by a specific CPU, the same CPU architecture can be cross.
Example:
CentOS 6.5 (AMD 64bits) 64bits, binary program
CentOS 6.5 (Intel 64bits) 64bits,
The above two are all CPUs of the X86 architecture, so the instruction set is the same, the compiled program can cross the platform
Therefore, when installing the application, you need to consider whether the OS is compatible and the underlying architecture is compatible
Components of the package:
Binaries General location:/bin,/sbin,/usr/bin,/usr/sbin,/usr/local/bin,/usr/local/sbin
If: Install Nginx,/usr/local/nginx/
Library:/lib,/usr/lib,/lib64,/usr/lib64,/usr/local/lib,/usr/local/lib64
If: Install Nginx,/usr/local/nginx/
The LDD command will only find the first four libraries
/etc/ld.so.conf,/etc/ld.so.conf.d/*.conf
Configuration file:/etc
Help file:
Man file, info file, README, INSTALL, ChangeLog
Mans COMMAND
Find the name of a compressed file with the same name as the command name, usually ending in. gz, to a path
/usr/share/man/
The man command will only look for files under this path.
For example, if man has a/usr/local/nginx/instruction, he cannot go directly to the man, he can modify the man's Manpath or specify the path that man accesses.
Summary: Install the Nginx program under this path:
/usr/local/nginx/, then the following are all under this path, the kernel is not automatically recognized
Binaries: Bin, sbin
Library: Lib
Header file: Include
Help file: Man
Configuration file: etc/conf
Function name (parameter), header file
LDD command:
See which shared libraries your app depends on
LDD [Options] FILE ...
[Email protected] ~]# Ldd/bin/vi
Linux-gate.so.1 = (0x00a03000)
libm.so.6 =/lib/libm.so.6 (0x00f6c000)
Libselinux.so.1 =/lib/libselinux.so.1 (0x00a96000)
#include stdio.h header file, which contains the name of the function, parameters, etc., generally in the Include directory has such a file
Application Manager:
1. Database:
Software name and version
Each file path and checksum code generated by the installation
Dependent relationships
Provide functional descriptions
2, the provider format:
List of documents
A script to run when loading and unloading
Application: Source code name-major.minor.release.tar.gz
Dependencies: X---Y
Cyclic dependency:
Version dependent:
Program Management tools:
Debian:. Deb, dpkg
RedHat:. RPM, RPM (RedHat package Manager)
RPM:RPM is package Manager
Basic features of Package Manager:
Packaged
Installation
Inquire
Upgrade
Unloading
Check
Database management
Dependencies: X, Y, M,n, l,i,k
Front end manager: resolves dependencies
Apt-get
Yum
Summary: How the application is installed
Using Package Manager: Easy and easy to use
Package Manager's front-end tool: Yum
Source code compilation: source code uses GCC to compile after use
Simple packaged binary format: This way tar is packaged in tar and can be used when decompressed
Review of learning Log---linuxの package management