Linux operations Practice and Yum and RPM package Management Learning Summary

Source: Internet
Author: User

I. Details of how YUM commands are used

YUM (Yellowdog Updater Modified)

1.

Yum repositories:

File Server address:

http://mirrors.aliyun.com/

http://mirrors.163.com/

For more images, see: http://www.douban.com/note/375227086/

2.YUM configuration file

/etc/yum.conf Defining a global configuration: configurations that are applicable to all warehouses

3.YUM Library Customization

/etc/yum.repos.d/*.repo a file is typically used for a warehouse or a group of similar or related functions

[REPO_ID]

Name=

Baseurl=

# Mirrorlist=scheme://hostname/path/to/mirror_list_file

enabled={1|0}1 = enabled, 0 means not enabled

Gpgcheck={1|0}1 means check is enabled (to specify the key path), 0 means no check is enabled (the key path can not be configured)

Gpgkey= local key path is: File///etc/pki/rpm-gpg/keyfilename

[Email protected] yum.repos.d]# VI Centos-base.repo

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/3A/wKiom1X33F-DOmXlAAHB-o_K2vo659.jpg "title=" Repo.png "alt=" Wkiom1x33f-domxlaahb-o_k2vo659.jpg "/> Exit save, use Yum repolist to view the new library, such as:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/3A/wKiom1X33NGimTVDAALTAwAcmI0884.jpg "title=" Repo2.png "alt=" Wkiom1x33ngimtvdaaltawacmi0884.jpg "/>

4.YUM Command Details

  1. Yum Installation

    [[email protected] ~]# yum install MySQL

    650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/3B/wKiom1X368OwDCbmAAbVELY3EB4041.jpg "title=" Install.png "alt=" Wkiom1x368owdcbmaabvely3eb4041.jpg "/>

  2. Yum Uninstall

    650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/3B/wKiom1X37G6x9z_QAAX_uJzo5oI274.jpg "title=" Remove.png "alt=" Wkiom1x37g6x9z_qaax_ujzo5oi274.jpg "/>

  3. Yum Upgrade

    [email protected] software]# Yum update ypbind.x86_64

    650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/38/wKioL1X38KbjQJ_eAAdYW9NAhBI745.jpg "title=" Update.png "alt=" Wkiol1x38kbjqj_eaadyw9nahbi745.jpg "/>

  4. Yum Query

    [email protected] ~]# Yum list

  5. Yum Re-installation

    [email protected] ~]# yum reinstall MySQL

  6. Yum downgrade

    [email protected] software]# Yum downgrade ypbind.x86_64

  7. Yum Cleanup Cache

    [email protected] ~]# Yum Clean packages

  8. For more information, please refer to: http://blog.chinaunix.net/uid-346158-id-2131252.html

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/3B/wKiom1X38geQ8bSfAADqTLYG21E180.jpg "title=" Package.png "alt=" Wkiom1x38geq8bsfaadqtlyg21e180.jpg "/>

[email protected] ~]# Yum Clean headers

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/38/wKioL1X38_uRnwdPAACLR_X6LzI078.jpg "title=" Remove.png "alt=" Wkiol1x38_urnwdpaaclr_x6lzi078.jpg "/>

[email protected] ~]# Yum Clean all

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/73/38/wKioL1X39F_yHoM7AAEb-TdBvWg715.jpg "title=" All.png "alt=" Wkiol1x39f_yhom7aaeb-tdbvwg715.jpg "/>

Second, the RPM command to use the method of explanation

RPM (Original: RedHat Package Manager now means: RPM is the package manager)

(Package, install, uninstall, upgrade, query, check)

1. Package Command mechanism: name-version-release.arch.rpm

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/2C/wKioL1X3gW6j-Nb1AAZGsxdkkjQ663.jpg "title=" Package naming mechanism. png "alt=" wkiol1x3gw6j-nb1aazgsxdkkjq663.jpg "/>

2.RPM Package Acquisition Method

1, release version self-provided package

2,fedora-epel

3, the official site of the project

4, search engine

Http://rpmfind.net

Http://rpm.pbone.net

http://pkgs.org

5, Mount device file acquisition

3.RPM (package, install, uninstall, upgrade, query, check)



RPM-IVH xxx.rpm
Install a package-i:install-v: Show installation Process-H: Show installation progress in #
RPM-UVH xxx.rpm Upgrade a package-u:upgrade if there is an older version of the package, upgrade it, or if not, install it;
RPM-FVH xxx.rpm Remove a package-f:freshen if there is an older version of the package, upgrade it, or if not, install it;
Rpm-e xxx.rpm Removing a package-e:erase
Rpm-qa Query the current machine on all installed RPM packages-q:query-a:all
Rpm-q xxx Query if XXX package exists
Rpm-qf Query which package the file is generated by
Rpm-qc Queries the specified package installation build configuration file
Rpm-qd Query the specified package installation build document
Rpm-qi Querying for information about a specified package
Rpm-ql Query the list of all files generated by the specified package installation
Rpm-v Verifies whether the current file has been changed

4. Package Check:

1, local key address:/ETC/PKI/RPM-GPG

[Email protected] yum.repos.d]# ll/etc/pki/rpm-gpg/-rw-r--r--. 1 root root 1706 October rpm-gpg-key-centos-6-rw-r--r--. 1 root root 1730 October rpm-gpg-key-centos-debug-6-rw-r--r--. 1 root root 1730 October rpm-gpg-key-centos-security-6-rw-r--r--. 1 root root 1734 October rpm-gpg-key-centos-testing-6

2, import the local key: Rpm-import/etc/pki/rpm-gpg/keyfile

[Email protected] yum.repos.d]# rpm--import/etc/pki/rpm-gpg/rpm-gpg-key-centos-6

3, RPM package check: Rpm-k/rmpfile

[Email protected] software]# rpm-k mysql-server-5.5.36-1.el6.x86_64.rpm MYSQL-SERVER-5.5.36-1.EL6.X86_64.RPM:SHA1 MD5 (GPG) not OK (MISSING keys:gpg#5072e1f5)






This article is from the "Small Togo" blog, please be sure to keep this source http://icestick8586.blog.51cto.com/9867871/1695058

Linux operations Practice and Yum and RPM package Management Learning Summary

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.