Linux Package Management

Source: Internet
Author: User
Tags yum repolist

Linux Package Management:
API: Data interface
ABI: Application Binary interface
Library-level virtualization:
Linux:wine
Windows:cywin
System-Level development: C/D: Httpd,nginx,vsftpd,go
Application-level development: Java Python perl php

Program format:

Source code: Text Format of the program code;
Compiling the development environment: compilers, header files, development libraries
Binary format: Text Format program code –> compiler –> binary format
Development environment: compilers, development libraries

Package Manager:
Source code –> target binary format –> organization becomes one or a limited number of "package" files;
Assist to install, upgrade, uninstall, query, verify
Package Manager
Debian:dpt,dpkg ". Deb"
rehat:rpm ". RPM"
SUSE:RPM,

Previous tool: Automatically resolve dependencies:
YUM:RPM Package Management's front-section tools
Apt-get:deb Front-section tools for Package Manager
Zypper:suse RPM Manager Front-end tool
DNF: Also a front-end tool for RPM Package Manager

View the library files that the binaries depend on Ldd/path/to/binary_file

Ways to get Packages:
System release CD or official file server (or mirror site)
Http://mirrors.aliyun.com
Http://mirror.sohu.com
Http://mirror.163.com
Official site of the project
Third-party organizations: EPEL
Search Engine: http://pkgs.org
Http://rpmfind.net
Http://rpm.phone.net
DIY, clothed
Recommendation: Check its legality
SOURCE Legitimacy
The integrity of the package
The RPM command management package on the CentOS system:
Install, upgrade, uninstall, query and verify, database maintenance
RPM Command:
-I: Installation
-U: Upgrade
-E: Uninstall
-Q: Query
-V: Checksum
–BUILDDB: Database Maintenance
–test: Test installation, check and report dependencies and conflicting messages, etc.
–nodeps: Ignore dependencies, not recommended
–replacepkgs: Reinstall
Upgrade:
Rpm-u: Upgrade or install
-F: Upgrade only
Rpm-uvh
–oldpackage: Downgrade
–force: Forced upgrade
Note: (1) do not upgrade the kernel, Linux supports multi-core version coexistence, so install the new version directly
(2) If the configuration file of the original package has been modified after installation, upgrade, the new version of the program provided by the same configuration file will not overwrite the original version of the configuration file, but the new version of the configuration file to be provided after renaming;
Uninstall: directly to the package name
RPM-E: Uninstalling
–allmatches: Uninstalls all versions of packages that match the specified name
–nodeps: Ignoring dependencies
–test: Test Uninstall

      Enquiry:   RPM-QA  -QC  -ql   etc
          rpm-q: Query &nb Sp
             -A: Check all installed packages
             - F File: Query which package installation generated by the specified file
             -L: List of all files generated by the package installation
      & nbsp      -I: Package related information, version number, size, package group, etc.
             -C: Query the configuration file provided by the specified package              -D: Query the documentation provided by the specified package
              -P: Specify a package file that is not installed to do a query operation
      checksum: rpm-v  filenam      

Package source legitimacy verification and integrity verification:
Gets and imports the secret key of a trusted package author
Verify:
When you install a program signed by this organization, validation is performed automatically;
Manual verification: Rpm-k PackageFile
Database rebuild:
RPM Manager database path:/var/lib/rpm RPM–INITDB Initialization If the database does not exist beforehand, the new
Query operations: through the database here; rpm–rebuliddb rebuilding the database of installed packages index

Get help:
Man rpm CENTOS6
Mans Rpmdb Centos7


Yum:yellowdog update Modifier, RPM's front-end program, which resolves package dependencies, locates packages between multiple libraries Up2date
The Alternative tool
Yum Repository:yum repo, which stores a wide range of RPM packages and related metadata files for packages (placed in a specific directory repodata)
File server:
                   ftp://
                                        / http
                                        file://

Yum Client configuration file:
/ETC/YUM.CONF: Providing public configuration for all warehouses
/etc/yum.repos.d/*.repo: Provides configuration for the point of the warehouse
Configuration format: [Repositoryid]

                                                             baseurl=ftp://       /HTTP//     file://

                                     gpgcheck=0 do not check for signatures

Yum repolist Check for success and will display specific information

The FTP server creates a Yum source:

     rpm-ivh/mnt/p    vsftp           Install FPT Services
    &NB Sp;service vdftpd  start                   Open FTP service
    &NBSP ; Systemctl start Vsftpd.service         CENTOS7 open FPT
     iptables  -f                           Clear firewall
        &N Bsp      -VNL                         View firewall
&nbs P    setenforce 0                         Disable SELinux
     MKDIR/VAR/FTP/PUB/6             Disc mount Path
     mount-o l OOP Centos.iso  /var/ftp/pub/  production
     mount–bind/misc/cd//var/ftp/pub/    &NBS P; Experiment

http://server/centos/$releasever/$basearch/General format

Find help: The above settings are best set to boot automatically:

Auto- Mount CD-ROM:/etc/fstab

format /dev/cdrom/var/ftp/pub/iso9660 Auto 0 0

Auto-Open FPT Service: Chkconfig vsftpd on

Auto-off firewall: chkconfig iptables off

Turn off Selinux:vim/etc/sysconfig/selinux change the seventh line to permissive (Open the file with instructions)

Yum History View previous Yum installation information

Yum History Info # view a specific message

Yum History undo # Undo # This operation, you can uninstall the previously installed dependency package

Linux Package Management

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.