系统相关
首页 > 系统相关> > Linux Yum 命令使用举例

Linux Yum 命令使用举例

作者:互联网

Linux Yum 命令使用举例 第2页_Linux教程_Linux公社-Linux系统门户网站  https://www.linuxidc.com/Linux/2011-09/42108p2.htm

#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 Shell

 

标签:15,x86,fc15,举例,64,yum,Linux,Yum,Fedora
来源: https://www.cnblogs.com/jmbt/p/16640549.html