Linux notes--software management

Source: Internet
Author: User
Tags gpg

C Language: Source code--compilation (binary format)

Script: Interpreter (binary)

program = instruction + data

Part of the program:
Binaries (/bin/sbin), libraries (shared libraries and their own library/lib), configuration files (etc), help files (/usr/share/man)

Package Management:
Put binaries, library files, configuration files, Help files, package into a file and generate a database to track every file you install
Core features of the Package Manager: 1. Making a package 2. Install, uninstall, upgrade, query, verify

RedHat, suse:rpm
Debian:dpt

Dependent relationships
Front-end tools: Yum and apt-get: auto-solve software dependencies
Back-end tools: RPM and DPT

RPM Package Naming: Example: zlib-1.2.3-29.el6.x86_64.rpm and zlib-devel-1.2.3-29.el6.x86_64.rpm
Main package: zlib-1.2.3-29.el6.x86_64.rpm
Sub-Package: zlib-devel-1.2.3-29.el6.x86_64.rpm
Naming format:
Package name (zlib or Zlib-devel)-version number (1.2.3)-issue number (29). Platform Architecture (EL6.X86_64) if the platform architecture is noarch, it means that the software can be used on any platform
Version number (1.2.3): Major version number. minor version number. Issue number
Major version number: What are the important improvements
Minor version number: A child function has been improved
Issue number: Fix some bugs, adjust the function
Note: When installing soft, be sure to pay attention to the match of platform architecture, uname-a or-r view hardware architecture

RPM Commands: Installation, query, uninstall, upgrade, checksum, database rebuild, validate packets
1. Installation:
-I specify File path
-H to # Show progress, each # represents 2%
-V Show detailed procedures
-VV Show more detailed procedures
Generally used together: rpm-ivh/patn/
--nodeps ignores dependencies, but may cause software to not run
--force forced installation can be re-installed or degraded
2. Enquiry:
-Q Query Whether the specified software has been installed (-Q followed by the software name, without adding the version number and later)
-qa querying all packages that have been installed
-qi querying the details of a specified package
-QL Query the list of files generated by the specified package installation
-QF Query the specified file is generated by that RPM package
3. Upgrade:
-UVH Upgrade the specified software (with a new version on the upgrade installation, no installation of the specified software)
-FVH Upgrade the specified software (new version on upgrade installation, no installation of the specified software)
-UVH--oldpackage Downgrade installation
4. Uninstall:
-e Uninstalls the specified software name (but the software cannot be relied upon)
--nodeps Ignore dependency forced uninstallation
5. Check:
-V verifies the specified software name
6. Rebuilding the database:
--rebuilddb whether or not the database is rebuilt
--INITDB Initialize Database (there is no rebuild, no build)
7. Verification of source legality and software integrity:
-K software package (DSA, GPG: Verifying the legitimacy and signature of the source name 、--Nosignature: Skip this SHA1, MD5: Verifying package Integrity--nodigest: Skip this)
--import/etc/pki/rpm-gpg/rpm-gpg-key-readhat-release: Import Key file (RH5)

Meta-data files in the Yum repository:
In the installation image file:
Centos6:repodata file inside
Redhat5:/server/repodata file inside
The information is recorded in the. primary.xml.gz:
1. List of all RPM packages
2. Dependencies for all software
3. List of files generated per RPM package installation
. filelists.xml.gz
1. List of all files in the current warehouse for all RPM packages
. other.xml.gz
1. Additional information, change log of RPM package
. repomod.xml
1. Record the timestamp and checksum of the above three files
. comps.xml
Grouping information for 1.rpm packages

Yum command:
The RPM list in the List:yum warehouse can also be connected to the corresponding parameters all Avai available able not installed installed the updates that are already installed are available for upgrade
Clean: Cleanup Cache
Repolist: Display repo list and brief information can also be associated with the corresponding parameters all enabled by default disabled disabled
Install: Directly behind the installation with the software name
Updata: Upgrade
Updata to: modified to the specified version (can be used for demotion)
Remove: Uninstall and unload the dependent software
Info: Package Information
Provides: To see which package the specified file was built by
There are also some Yum group commands: GroupInfo grouplist groupinstall groupremove groupupdata

How to customize a Yum creation library:
Configuration folder:/etc/yum.repos.d/
1. First create a *.repo end file in the configuration folder
2. Edit in file: [Library name]
Name= Full Name
The exact location of the Baseusr=yum library is generally three kinds: ftp:///http/file:///
Enabled=1 or 0 is generally 1
Gpgcheck=1 or 0 is generally 0
(this option can not be written) gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
3.yum Makecache Refresh Repos

This article is from the "stupid Bird first-FAI" blog, please be sure to keep this source http://benniaoxianhui.blog.51cto.com/10463960/1679220

Linux notes--software 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.