我安装一个小程序
[root@kikupotter ~]# yum install tightvnc
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package tigervnc.x86_64 0:1.0.90-0.17.20110314svn4359.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
tigervnc x86_64 1.0.90-0.17.20110314svn4359.el6 base 260 k
Total download size: 260 k
Installed size: 651 k
Is this ok [y/N]: y
Downloading Packages:
tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm | 260 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : tigervnc-1.0.90-0.17.20110314svn4359.el6.x86_64 1/1
Installed products updated.
[root@kikupotter ~]# yum list all
//列出已经安装的安装包
[root@kikupotter ~]# yum list installed "krb?-*"
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Installed Packages
krb5-libs.x86_64 1.9-22.el6 @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.2
krb5-workstation.x86_64 1.9-22.el6 @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.2
//列出可用的,的安装包。
[root@kikupotter ~]# yum list available gstreamer\*plugin\*
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Available Packages
gstreamer-plugins-bad-free.i686 0.10.19-2.el6 base
gstreamer-plugins-base.i686 0.10.29-1.el6 base
gstreamer-plugins-base-devel.i686 0.10.29-1.el6 base
gstreamer-plugins-base-devel.x86_64 0.10.29-1.el6 base
gstreamer-plugins-good.i686 0.10.23-1.el6 base
特别说一下,yum还有一个功能就是包组的管理。这个很好用的。比如说,我要装一个apache服务器,那么我要装很多个包,但是我如果用包组进行安装的话,只需要安装一个包组所有的依赖包都会全部安装上去。
安装KDE桌面
[root@kikupotter ~]# yum -v grouplist kde\*
Not loading "rhnplugin" plugin, as it is disabled
Not loading "blacklist" plugin, as it is disabled
Loading "product-id" plugin
Loading "refresh-packagekit" plugin
Loading "security" plugin
Loading "subscription-manager" plugin
Not loading "whiteout" plugin, as it is disabled
Updating certificate-based repositories.
Config time: 0.065
Yum Version: 3.2.29
Setting up Group Process
rpmdb time: 0.001
group time: 0.163
Available Groups:
KDE 桌面 (kde-desktop)
Done
yum groupinstall group_name
yum groupinstall groupid
yum install @group
~]# yum groupinstall "KDE Desktop"
~]# yum groupinstall kde-desktop
~]# yum install @kde-desktop
用以上任何的一个命令都可以安装哦。 查看包的信息
在查找依赖的时候 ,最麻烦的就是版本的问题了,什么库要大于哪个哪个,要去找对应版本的包。
[root@kikupotter ~]# yum info tftp
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Installed Packages
Name : tftp
Arch : x86_64
Version : 0.49
Release : 7.el6
Size : 45 k
Repo : installed
From repo : base
Summary : The client for the Trivial File Transfer Protocol (TFTP)
URL : http://www.kernel.org/pub/software/network/tftp/
License : BSD
Description : The Trivial File Transfer Protocol (TFTP) is normally used only
: for booting diskless workstations. The tftp package provides the
: user interface for TFTP, which allows users to transfer files to
: and from a remote machine. This program and TFTP provide very
: little security, and should not be enabled unless it is expressly
: needed.