Linux commands: Yum package management

Source: Internet
Author: User
Tags yum repolist aliyun

Yum Introduction to Commands:

online installation, upgrade, uninstall software and other operations .

1. Command format:

Yum-y Install package name installs the specified package-y auto-answer

2 . Command function:

online installation, upgrade, uninstall software and other operations .

3 . Command parameters:

1. Yum Install Yum Package

Yum Install package Name

Usage:yum Install Php53-mysql installation php53-mysql software

-Y Auto Answer install Yes

--nogpgcheck

2. Update: Upgrade

Yum Update: Package name upgrade software directly

Yum update_to package name and version number upgraded to the specified version of the software

3. Remove: Uninstall

Yum Remove package Name: Uninstall software

4. Info: View package information

Yum Info gcc

5. Provides: View the specified file or feature is generated by that package installation

Yum Provides/etc/inittab

6. Yum list: Lists all yum installation packages and supports wildcard characters

Yum List all: Show all Yum installation packages

Yum List all gcc* see all of the Yum installation packages for GCC

Yum list available: available, but not yet installed Yum installation package

Yum List installed: Installed Yum installation package

Yum list updates: Available upgrade installation packages

7. Yum Clean: Cleanup cache

Yum Clean {Packages|headers|metadata|dbcache|all}

8. Yum repolist: Displays the repo list and its brief information

Yum Repolist all displays all the repo list information

Yum Repolist enabled: The default is to display enabled repo list information

Yum repolist disabled: Displays repo list information that is not enabled

9. Grouplist: Show Yum Group information

Yum Grouplist

10. GroupInfo: Displays information for the specified group

Yum groupinfo "group name"

11, Groupinstall install Yum group Yum groupinstall "group name"

12. Groupremove Delete yum group yum groupremove "group name"

13, groupupdate Update group information yum groupudate "group name"

14, Localinstall install local RPM package, if there is a dependency on automatic installation through the Yum source

Yum Localinstall local RPM package full name

Usage:yum Localinstall php53-mysql-5.3.3-e15.i386.rpm


4 . Command instance:

1, configure Yum file, so that even if not in the Internet environment can be installed Yum

according to the/etc/yum.conf Yum profile information, yum installation only recognizes configuration files with the suffix. Repo format

[Email protected] yum.repos.d]# cat/etc/yum.conf

[Main]

cachedir=/var/cache/yum/$basearch/$releasever

Keepcache=0

debuglevel=2

Logfile=/var/log/yum.log

Exactarch=1

Obsoletes=1

Gpgcheck=1

Plugins=1

Installonly_limit=5

Bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_ Page.php?category=yum

Distroverpkg=centos-release


# This is the default and if you do this bigger Yum won ' t see if the metadata

# is newer on the remote and so you'll "gain" the bandwidth of not have to

# Download the new metadata and ' pay ' for it by Yum don't have correct

# information.

# It is the esp. important, to has correct metadata, for distributions like

# Fedora which don ' t keep old packages around. If you don ' t like this checking

# interupting your command line usage, it's much better to has something

# Manually check the metadata once an hour (Yum-updatesd'll do).

# metadata_expire=90m


# PUT YOUR REPOS here OR in separate files named File.repo has been described in recognition. Repo format

# IN/ETC/YUM.REPOS.D and Yum configuration files must be placed in this directory

View the files under the/ETC/YUM.REPOS.D directory

[Email protected] yum.repos.d]# ls/etc/yum.repos.d/

Centos-base.repo Centos-debuginfo.repo Centos-media.repo Centos-vault.repo

Re-add the new. Repo file

Vim Server.repo

[Base]

name=centos6.5 Sever

Baseurl=

Ftp://192.168.1.100/pub/Server #配置ftp服务器为yum源, the Yum installation package is stored in this directory

# http://mirror.centos.org/centos/$releasever/os/$basearch/#配置网络yum源安装包

# file:///media/cdrom/#配置本地yum源, this/media/cdrom directory stores the Yum installation package for a native directory

Enabled=1 #启用该配置文件

Gpgcheck=0 #不启用检查

Note: A configuration file can only be configured with a Yum source, such as configuring a network Yum source, without adding 2 other yum source paths

2. Yum List all gcc* See all Yum installation packages for GCC

[email protected] yum.repos.d]# Yum list gcc*

Loaded Plugins:fastestmirror, security

Repository ' Base ': Error parsing config:error parsing "Gpgcheck = ' 0 #\xe4\xb8\x8d\xe5\x90\xaf\xe7\x94\xa8\xe6\xa3\x80\ Xe6\x9f\xa5 ' ": Invalid Boolean value

Loading mirror speeds from cached hostfile

* base:mirrors.aliyun.com

* extras:mirrors.aliyun.com

* updates:centos.cs.nctu.edu.tw

Installed Packages installed version

gcc.i686 4.4.7-17.el6 @base

Available Packages available, not yet installed GCC-related packages

gcc-c++.i686 4.4.7-17.EL6 Base

gcc-gfortran.i686 4.4.7-17.EL6 Base

gcc-gnat.i686 4.4.7-17.EL6 Base

gcc-java.i686 4.4.7-17.EL6 Base

gcc-objc.i686 4.4.7-17.EL6 Base

gcc-objc++.i686 4.4.7-17.EL6 Base

3. Check the Yum list for PHP-related installation packages

[email protected] yum.repos.d]# Yum List all php*

Loaded Plugins:fastestmirror, security

Loading mirror speeds from cached hostfile

* base:mirrors.aliyun.com

* extras:mirrors.aliyun.com

* updates:centos.cs.nctu.edu.tw

Installed Packages

php.i686 5.3.3-26.el6 @anaconda-centos-201311271240.i386/6.5

php-cli.i686 5.3.3-26.el6 @anaconda-centos-201311271240.i386/6.5

php-common.i686 5.3.3-26.el6 @anaconda-centos-201311271240.i386/6.5

php-gd.i686 5.3.3-26.el6 @anaconda-centos-201311271240.i386/6.5

php-pdo.i686 5.3.3-26.el6 @anaconda-centos-201311271240.i386/6.5

Php-pear.noarch 1:1.9.4-4.el6 @anaconda-centos-201311271240.i386/6.5

php-xml.i686 5.3.3-26.el6 @anaconda-centos-201311271240.i386/6.5

Available Packages

php.i686 5.3.3-48.el6_8 Updates

php-bcmath.i686 5.3.3-48.el6_8 Updates

php-cli.i686 5.3.3-48.el6_8 Updates

php-common.i686 5.3.3-48.el6_8 Updates

php-dba.i686 5.3.3-48.el6_8 Updates

php-devel.i686 5.3.3-48.el6_8 Updates

php-embedded.i686 5.3.3-48.el6_8 Updates

php-enchant.i686 5.3.3-48.el6_8 Updates

php-fpm.i686 5.3.3-48.el6_8 Updates

php-gd.i686 5.3.3-48.el6_8 Updates



This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1877970

Linux commands: 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.