Software package management of Linux learning notes

Source: Internet
Author: User
Tags gpg parent directory sha1 yum repolist

Package Management
Package composition
Binary program
Configuration file
Single File
Cut the master profile into multiple small files and place them in a directory.
/etc/profile,/etc/profile.d/*
/etc/pam.conf,/etc/pam.d/*
Single file, which is split internally into multiple fragments.
[MySQL] [Mysqld] ...
Library files: Binary executable functions (all C programs are composed of functions) share modules
Static Library
Dynamic Library
Help file
Manual page
Document (/usr/share/doc)
/bin/sbin system Start-up use
/usr/bin/usr/sbin most software
/usr/local/bin/usr/local/sbin Third party software
The operating system boot files are redhat6/usr and cannot be partitioned independently.
To reduce the/bin/sbin size part of the system startup file is also placed on the/usr/bin/usr/sbin.
Third-party software can independently separate/usr/local when compared

Library files
/lib/lib64/usr/lib
/etc/ld.so.conf.d/*.conf
The system cannot find the library file under/usr/local/etc/ld.so.conf so shared object
The library file under/usr/local/lib is stored in the build/etc/ld.so.conf.d/xxx.conf
The search path. The system writes the/etc/ld.so.conf
of the/ETC/HTTPD/HTTPD software

Help file:
/usr/share/man
/etc/man.conf specify man where to find man file doc
/usr/share/doc

header file;
/usr/include
Kernel glibc app os three major components
GLIBC C language Standard Universal Library

Hardware architecture:
x86 x64 POVERPC SPARC Arm
Binaries: Format-specific hardware platform (compiler itself is optimized for running on a specific platform at software compilation time)
name-version-release-.arch.rpm
version:3.2.4
Major Minor release
32bit x86
i386 i486 i586 i686
64bit x86
x86_64
NOARCH.RPM platform-agnostic platform files

Name-version: Main Package
Name-subname-version: Child Package
Name-devel-version: Vault File Header File

Cyclic dependencies need to be installed at the same time.

Yum:yellowdog Update modifier rpm frontend
Yum relies on RPM as its upgraded version.
dpkg-----> Apt-get
RPM----->deb

RPM Package RPM Yum
Source Package Compilation Installation
Make a good binary package compression package, after decompression configuration used.
MySQL MongoDB

RPM Install---------------> rpm-i pkg1 pkg2 ...//path
RPM Eraser---------------> Rpm-e pkg1 ....
RPM Update---------------> Rpm-u | -F pkg1 ....
RPM Verify---------------> Rpm-v pkg1 ...
RPM Query---------------> Rpm-q ...

Install
Rpm-i
-V Verbose
-H # Progress
--test
--nodeps Ignore dependencies
--replacepkgs
--force ignores conflict.

Before install pre
After install post finishing
Preun before uninstalling
After uninstalling Postun

Uninstall
RPM-E PKS1 is dependent on non-unloading.
Rpm-e PHP-CLI
Update:
F freshing no old, then no new
U update without old, install the new
--oldpackages
The kernel should not upgrade the installation. The kernel allows multiple versions to coexist.
Query
Rpm-q
Rpm-qi
Signature: Fingerprint information data characteristics of one-way encryption extraction data
If the original data is the same, the result data must be the same
Avalanche effect, the original data is a little different, the results are very different.
RPM Extracts the signatures and attaches them to the software package. The official uses its own private key.
Private key encryption, public key decryption.
Tampering destroys the signature. Private key.
Public key decryption Gets the official signature, and uses the same method to extract the signature code.
, and compare and decrypt the signatures in a consistent pattern.
RPM-QL pkg1 list shows which files are installed
RPM-QF file Check rpm package according to files
RPM-QC Pkg View configuration file
RPM-QD pkg View Document man Readme Install

Rpm-a--scripts pkg1 Script built-in script to execute installation

Add p parameter if not yet installed

Rpm-v Pkg1
Rpm-k pkg1 Check Signature
RPM--import key1 Import public key/etc/pki/rpm-gpg/xxx
No sign SHA1 MD5 OK
SHA1 MD5 Packet Complete checksum
--nodigest does not check for one-way encryption SH1 MD5
--nosignature not verifying signature information GPG DSA

Rebuilding the RPM database
/var/lib/rpm
*db* Lock File
The other is the lock file.
RPM--INITDB is removed or does not exist then does not overwrite
RPM--REBUILDDB Overlay Rebuild


Source made into RPM package

Yum
Route RPM Package Collection XML document metadata file
REDHAT5 Pack Separate storage:
Basic software commonly used by the server
/repodata Yum Source information parent directory is warehouse
Cluster Cluster
Clusterstore cluster storage related
Vt
What is the source of Yum
Download to local cache metadata cache to local
3 Types of protocol:
Local file:///protocol
Remote server ftp:///HTTP/
Yum Warehouse:
RPM Package
The repodata/directory XML file can be used as a Yum source only if the path containing this directory is its subdirectory
Repomd.xml save time stamp to see if there are any changes
Primary.xml.gz the name and dependencies of each RPM package in the current Yum repository:
also contains each RPM package to be able to install the generated files;
Filelists.xml.gz: All RPM packages contain a list of files that are installed to generate files.
OTHER.XML.GZ: Additional information mainly contains RPM package of Chnagelog;

Definition of RPM Package group
Yum configuration file subcommand
/etc/yum.conf/*
/etc/yum.repos.d/*
/etc/yum/pluginconf.d/*
Global Configuration Staging configuration
Global/etc/yum.conf

Yum
Yum Repolist
Yum List {installed | available | updates | all}
Yum Clean {all | packages | metadata}///var/cache/yum
Yum Grouplist
Yum GroupInfo "Group_name"
Yum Info "Pkg_name"
Provides FILE
Install-y
Remove
Update
Groupinstall
Localinstall
Reinstall
Check-update

Install Createrepo

Createrepo dir

--nogpgcheck




Createrepo
Redhat6
Package
Server

createrepo-g xxx

Software package management of Linux learning notes

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.