linux yum clean up,Linux Yum 命令使用举例

本文介绍了如何使用yum命令进行软件组的安装(yumgroupinstall)、升级(yumgroupupdate)和卸载(yumgroupremove),包括具体操作步骤和示例。还讲解了如何查看和管理yum软件源,以及如何从损坏源安装软件。
摘要由CSDN通过智能技术生成

#10,使用yum groupinstall 安装某个特定软件组:上个命令是列出软件组,使用“yum groupinstall ”来安装特定的软件组:

使用举例:

# yum groupinstall 'DNS Name Server'

Dependencies Resolved

Install       2 Package(s)

Is this ok [y/N]: y

Package(s) data still to download: 3.6 M

(1/2): bind-9.8.0-9.P4.fc15.x86_64.rpm             | 3.6 MB     00:15

(2/2): bind-chroot-9.8.0-9.P4.fc15.x86_64.rpm   |  69 kB     00:00

-----------------------------------------------------------------

Total               235 kB/s | 3.6 MB     00:15

Installed:

bind-chroot.x86_64 32:9.8.0-9.P4.fc15

Dependency Installed:

bind.x86_64 32:9.8.0-9.P4.fc15

Complete!

#11,使用“groupupdate”升级软件组

使用“yum groupinstall”安装软件组后,可用下面命令升级该软件组到最新版本:

# yum groupupdate 'Graphical Internet'

Dependencies Resolved

Upgrade       5 Package(s)

Is this ok [y/N]: y

Running Transaction

Updating   : evolution-data-server-3.0.2-1.fc15.x86_64     1/10

Updating   : evolution-3.0.2-3.fc15.x86_64                 2/10

Updating   : evolution-NetworkManager-3.0.2-3.fc15.x86_64  3/10

Updating   : evolution-help-3.0.2-3.fc15.noarch            4/10

Updating   : empathy-3.0.2-3.fc15.x86_64                   5/10

Cleanup    : evolution-NetworkManager-3.0.1-1.fc15.x86_64  6/10

Cleanup    : evolution-help-3.0.1-1.fc15.noarch            7/10

Cleanup    : evolution-3.0.1-1.fc15.x86_64                 8/10

Cleanup    : empathy-3.0.1-3.fc15.x86_64                   9/10

Cleanup    : evolution-data-server-3.0.1-1.fc15.x86_64     10/10

Complete!

#12,”yum groupremove”卸载软件组

使用举例:

# yum groupremove 'DNS Name Server'

Dependencies Resolved

Remove        2 Package(s)

Is this ok [y/N]: y

Running Transaction

Erasing    : 32:bind-chroot-9.8.0-9.P4.fc15.x86_64  1/2

Erasing    : 32:bind-9.8.0-9.P4.fc15.x86_64            2/2

Complete!

#13,列出当前yum软件源

使用举例

# yum repolist

repo id     repo name                        status

Fedora      Fedora 15 - x86_64               24,085

updates     Fedora 15 - x86_64 - Updates     5,612

列出所有软件源(“yum repolist all”):

# yum repolist all

repo id                   repo name                                status

fedora                    Fedora 15 - x86_64                       enabled: 24,085

fedora-debuginfo          Fedora 15 - x86_64 - Debug               disabled

fedora-source             Fedora 15 - Source                       disabled

rawhide-debuginfo         Fedora - Rawhide - Debug                 disabled

rawhide-source            Fedora - Rawhide - Source                disabled

updates                   Fedora 15 - x86_64 - Updates             enabled:  5,612

updates-debuginfo         Fedora 15 - x86_64 - Updates - Debug     disabled

updates-source            Fedora 15 - Updates Source               disabled

updates-testing           Fedora 15 - x86_64 - Test Updates        disabled

updates-testing-debuginfo Fedora 15 - x86_64 - Test Updates Debug  disabled

updates-testing-source    Fedora 15 - Test Updates Source          disabled

也可以使用命令“yum repositories disabled”查看已损坏的软件源。

#14,使用“yum –enablerepo”从已损坏软件源安装软件

默认情况下,yum安装软件只从当前未被损坏的软件源中安装软件。如果我们想要从已损坏源中安装软件,可以使用命令:

# yum --enablerepo=fedora-source install vim-X11.x86_64

Dependencies Resolved

Install       1 Package(s)

Is this ok [y/N]: y

Running Transaction

Installing : 2:vim-X11-7.3.138-1.fc15.x86_64   1/1

Complete!

#15,使用Yum Shell

如下事例:

# yum shell

Setting up Yum Shell

> info samba.x86_64

Available Packages

Name        : samba

Arch        : x86_64

Epoch       : 1

Version     : 3.5.11

Release     : 71.fc15.1

Size        : 4.6 M

Repo        : updates

Summary     : Server and Client software to interoperate with Windows machines

URL         : http://www.samba.org/

License     : GPLv3+ and LGPLv3+

Description :

: Samba is the suite of programs by which a lot of PC-related

: machines share files, printers, and other information (such as

: lists of available files and printers). The Windows NT, OS/2, and

: Linux operating systems support this natively, and add-on packages

: can enable the same thing for DOS, Windows, VMS, UNIX of all

: kinds, MVS, and more. This package provides an SMB/CIFS server

: that can be used to provide network services to SMB/CIFS clients.

: Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT

: need the NetBEUI (Microsoft Raw NetBIOS frame) protocol.

>

可以使用yum shell 运行多个命令:

举例:

# cat yum_cmd.txt

repolist

info nfs-utils-lib.x86_64

# yum shell yum_cmd.txt

repo id     repo name                        status

fedora      Fedora 15 - x86_64               24,085

updates     Fedora 15 - x86_64 - Updates     5,612

Available Packages

Name        : nfs-utils-lib

Arch        : x86_64

Version     : 1.1.5

Release     : 5.fc15

Size        : 61 k

Repo        : fedora

Summary     : Network File System Support Library

URL         : http://www.citi.umich.edu/projects/nfsv4/linux/

License     : BSD

Description : Support libraries that are needed by the commands and

: daemons the nfs-utils rpm.

Leaving Shell0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值