Yum Package Management

Source: Internet
Author: User
Tags gpg yum repolist

I. Introduction of YUM

A, yum, is the abbreviation of Yellow Dog updater,modified;

B, a package manager developed to provide RPM package installation;

C, function: Convenient to add, delete, update RPM package, automatically solve the problem of package dependencies;

Two

Configuration file:

/etc/yum.conf

/etc/yum.repo.d/*.repo

1,/etc/yum.conf

The Yum configuration file is divided into two parts: Main and repository

Main: Global configuration options are defined

Repository: Defines the specific configuration for each source/server.

Typically located in the/ETC/YUM.REPO.D directory

#/etc/yum.conf configuration file:

[main]

Cachedir=/var/cache/yum//yum  Cache Directory,yum  This store downloaded rpm  packages and databases, the default setting is/var/cache/yumkeepcache=0// If the package is retained after installation is complete, 0 is not reserved (default is 0), 1 is reserved debuglevel=2//debug  information output level, the range is 0-10, the default is 2logfile=/var/log/yum.log//yum  Log file location. Users can go to the/var/log/yum.log  file to check for updates made in the past. Pkgpolicy=newest//package strategy. A total of two options,newest  and last, this function is if you set up multiple repository, and the same software in different repository  in the same time,yum  should install which, if it is newest, The yum  will install the latest version. If it is last, yum  will sort the server id  in alphabetical order and select the software installation on the final server. Newest is generally chosen. Distroverpkg=redhat-release//Specifies a package,yum  will determine your distribution based on this package, by default, Redhat-release, or any installation of the rpm  package for its own release version. Tolerant=1//There are 1 and 2 options that indicate whether yum  tolerates a package-related error on the command line, and if you set it to 1, yum  will not have an error message. The default is 0exactarch=1//has 1 and 2 options, set to 1, then yum  only installs and system schema matching package, retries=6//network connection error after the number of retries, if set to 0, will be infinite retry. The default value is 6.obsoletes=1//This is a update  parameter, see Yum (8), simply the equivalent of upgrade, allowing the updating of stale RPM packages. Plugins=1//Whether the plug-in is enabled, default 1 is allowed, and 0 means disallowed. We usually use yum-fastestmirror this plugin.

2,/etc/yum.repos.d/*.repo
[serverid]                             //serverid is used to differentiate between different repository;name= Description of the Some name for this server        //repository, Support ¥releasever  $basearchbaseurl =url://server1/path/to/repository/             //baseurl :http,ftp,file  url://server2/path/to/repository/  url://server3/path/to/repository/gpgcheck=1                                              //packet integrity and source detection exclude= compiz* *compiz*                                //prohibit the installation and update of packages to be failovermethod= priority                                //priority based on the URL order, roundrobin  Random cycle gpgkey=file:///etc/pki/rpm-gpg/rpm-gpm-gpg-key-fedora-$basearch     // Define GPG keys for checksums

Three: Common operation commands

1. #yum repolist [All | enabled | disabled]//Display warehouse list

2. #yum List//display package

3, #yum install Package1 [Package2] [...] Install or upgrade packages

4. #yum update Package1 [Package2] [...] Upgrade Package

#yum downgrade Package1 [Package2] [...] Downgrade package

5. #yum check-update//check for available upgrades

6. #yum Remove |    Erase Package1 [Package2] [...] Uninstalling packages

7. #yum Info [...] View package Information

8. #yum//view specified features

9. #yum Clean [packages | all]//cleanup Local cache

10. #yum Makecache//Create cache

11, #yum Search [string1] [string2] [...] Specify keyword search packages and summary

12. #yum Reinstall Package1 [Package2] [...] Re-install

13. #yum deplist Package1 [Package2] [...] View the capabilities on which the package was developed

14. #yum History [Info | list | status | packages-list | packages-info]

View Yum Transaction History

Package group Management-related commands

1. #groupinstall group1 [group2] [...]

2. #grouupdate group1 [group2] [...]

3. #grouplist [hidden] [Groupwildcard] [...]

4. #groupremove group1 [group2] [...]

5. #groupinfo group1 [group2] [...]

Yum Command-line Options

1 、--nogpgcheck: no GPG check run

2,-y: Auto Answer Yes

3.-Q: Silent mode

4 、--Disablerpo=repoidglob: Temporary prohibition of repo specified here

--enablerepo=repoidglob: Temporarily enable repo

5 、--noplugins: Disable all plugins

Four: Compiling

1. Compilation Trilogy

./configure:

(1) Pass the parameters through the option, specify the enabling features, installation path, etc.;

The execution will refer to the user's designation and makefile.in file generation makefile

(2) Check the dependent external environment

Make

Build the application according to the makefile file.

Make install

Development tools:

AUTOCONF: Generate Configure Script

Automake: Generate makefile.in

Recommendation: View Install,readme before installation

2,   compile C source code:                          Prerequisites: Provide development work and development environment.                                       Development tools: Make, gcc                                        Development environment: Development Library, header file                                                      GLIBC: Standard library                                                                      Provides development components through "package groups".                                                  centos6 : "Development tools", " Server platform develoment "                        Centos7  :  "development  Tools

3. Compilation process
First step: Configure Script                                options: Specify the installation location, develop enabled features                                   --help  get the options it supports using                                             Options Category:                                                  Installation Path Setting:                                                          --prefix=: Specify the default installation location                                                                                                                      -- sysconfdir=/path/to/somewhere  configuration file path                                                  system types:                                                  optional features: Optional Features                                                            -- Disable-feature                                                          -- enable-feature[=arg]                                                 optional packages &NBSP: Optional Package                                                            --with-package[=arg]                       Second Step:make                      Third Step:make intall              post-installation configuration:                          (1) Export the binary program directory to the PATH environment variable                                    Edit File/etc/profile.d/name. sh                                             &nbsP;export path=/path/to/bin: $PATH                           (2) Export library file path                                    Edit  /etc/ld.so.conf.d/NAME.conf                                   System Regenerate Cache   ldconfig -v                           (3) Export header file                                   ln -sv  a link-based approach for                           (4) Export man file                                    Edit/etc/man.config File


This article is from the "86962983" blog, please be sure to keep this source http://wangzenghui.blog.51cto.com/9702487/1689931

Yum 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.