CentOS 7を「最小限のインストール」でインストールを行った後に、まとめて他のパッケージグループをインストールしたいことがあります。
5.3. パッケージグループでの作業
https://access.redhat.com/documentation/ja-JP/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-Working_with_Package_Groups.html
- パッケージグループの確認(yum group list)
- パッケージグループIDの確認(yum -v group list)
- パッケージグループの情報(yum group info)
- パッケージグループのインストール(yum group install)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
[root@host01 ~]# yum group list 読み込んだプラグイン:fastestmirror There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Loading mirror speeds from cached hostfile * base: ftp.tsukuba.wide.ad.jp * extras: ftp.tsukuba.wide.ad.jp * updates: ftp.tsukuba.wide.ad.jp Available environment groups: 最小限のインストール Compute Node インフラストラクチャサーバー ファイルとプリントサーバー ベーシック Web サーバー 仮想化ホスト サーバー (GUI 使用) GNOME Desktop KDE Plasma Workspaces 開発およびクリエイティブワークステーション 利用可能なグループ グラフィカル管理ツール コンソールインターネットツール システム管理 システム管理ツール スマートカードサポート セキュリティツール レガシーな UNIX 互換性 互換性ライブラリ 科学的サポート 開発ツール 完了 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
[root@host01 ~]# yum -v group list プラグイン「fastestmirror」を読み込んでいます Config time: 0.006 Yum version: 3.4.3 There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Setting up Package Sacks Loading mirror speeds from cached hostfile * base: ftp.tsukuba.wide.ad.jp * extras: ftp.tsukuba.wide.ad.jp * updates: ftp.tsukuba.wide.ad.jp pkgsack time: 0.009 group time: 0.044 Available environment groups: 最小限のインストール (minimal) Compute Node (compute-node-environment) インフラストラクチャサーバー (infrastructure-server-environment) ファイルとプリントサーバー (file-print-server-environment) ベーシック Web サーバー (web-server-environment) 仮想化ホスト (virtualization-host-environment) サーバー (GUI 使用) (graphical-server-environment) GNOME Desktop (gnome-desktop-environment) KDE Plasma Workspaces (kde-desktop-environment) 開発およびクリエイティブワークステーション (developer-workstation-environment) 利用可能なグループ グラフィカル管理ツール (graphical-admin-tools) コンソールインターネットツール (console-internet) システム管理 (system-management) システム管理ツール (system-admin-tools) スマートカードサポート (smart-card) セキュリティツール (security-tools) レガシーな UNIX 互換性 (legacy-unix) 互換性ライブラリ (compat-libraries) 科学的サポート (scientific) 開発ツール (development) 完了 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
[root@host01 ~]# yum group info web-server-environment 読み込んだプラグイン:fastestmirror Loading mirror speeds from cached hostfile * base: ftp.tsukuba.wide.ad.jp * extras: ftp.tsukuba.wide.ad.jp * updates: ftp.tsukuba.wide.ad.jp Environment Group: ベーシック Web サーバー Environment-Id: web-server-environment 説明: 静的および動的なインターネットコンテンツの配信を行うサーバーです。 Mandatory Groups: +base +core +web-server Optional Groups: +backup-client +debugging +directory-client +guest-agents +hardware-monitoring +java-platform +large-systems +load-balancer +mariadb-client +network-file-system-client +performance +perl-web +php +postgresql-client +python-web +remote-system-management +web-servlet |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@host01 ~]# yum group install web-server-environment 読み込んだプラグイン:fastestmirror Loading mirror speeds from cached hostfile * base: ftp.tsukuba.wide.ad.jp * extras: ftp.tsukuba.wide.ad.jp * updates: ftp.tsukuba.wide.ad.jp Warning: Group core does not have any packages to install. 依存性の解決をしています --> トランザクションの確認を実行しています。 ---> パッケージ abrt-addon-ccpp.x86_64 0:2.1.11-22.el7.centos.0.1 を インストール --> 依存性の処理をしています: abrt-libs = 2.1.11-22.el7.centos.0.1 のパッケージ: abrt-addon-ccpp-2.1.11-22.el7.centos.0.1.x86_64 --> 依存性の処理をしています: abrt = 2.1.11-22.el7.centos.0.1 のパッケージ: abrt-addon-ccpp-2.1.11-22.el7.centos.0.1.x86_64 (snip) |
man yumから
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
yum(8) yum(8) NAME yum - Yellowdog Updater Modified SYNOPSIS yum [options] [command] [package ...] groups A command, new in 3.4.2, that collects all the subcommands that act on groups together. Note that recent yum using distributions (Fedora-19+, RHEL-7+) have configured group_command=objects which changes how group commands act in some important ways. "group install" is used to install all of the individual pack‐ ages in a group, of the specified types (this works as if you'd taken each of those package names and put them on the command line for a "yum install" command). The group_package_types configuration option specifies which types will be installed. If you wish to "reinstall" a group so that you get a package that is currently blacklisted the easiest way to do that cur‐ rently is to install the package manually and then run "groups mark packages-sync mygroup mypackagename" (or use yumdb to set the group_member of the package(s)). "group update" is just an alias for group install, when using group_command=compat. This will install packages in the group not already installed and upgrade existing packages. With group_command=simple it will just upgrade already installed packages. With group_command=objects it will try to upgrade the group object, installing any available packages not blacklisted (marked '-' in group info) and will upgrade the installed pack‐ ages. "group list" is used to list the available groups from all yum repos. When group_command=objects the group is installed if the user explicitly installed it (or used the group mark* commands to mark it installed). It does not need to have any packages installed. When not using group_command=objects groups are shown as "installed" if all mandatory packages are installed, or if a group doesn't have any mandatory packages then it is installed if any of the optional or default package are installed (when not in group_command=objects mode). You can pass optional arguments to the list/summary commands: installed, available, environment, language, packages, hidden and ids (or any of those prefixed by "no" to turn them off again). If you pass the -v option, to enable verbose mode, then the groupids are displayed by default (but "yum group list ids" is often eas‐ ier to read). "group remove" is used to remove all of the packages in a group, unlike "groupinstall" this will remove everything regardless of group_package_types. It is worth pointing out that packages can be in more than one group, so "group install X Y" followed by "group remove Y" does not do give you the same result as "group install X". The groupremove_leaf_only configuration changes the behaviour of this command to only remove packages which aren't required by something else. "group info" is used to give the description and package list of a group (and which type those packages are marked as). Note that you can use the yum-filter-data and yum-list-data plugins to get/use the data the other way around (i.e. what groups own packages need updating). If you pass the -v option, to enable verbose mode, then the package names are matched against installed/available packages similar to the list command. When using group_command=objects, the info command will display markers next to each package saying how that package relates to the group object. The meaning of these markers is: "-" = Package isn't installed, and won't be installed as part of the group (Eg. "yum group install foo -pkgA" or "yum group install foo; yum remove pkgA" … this will have pkgA marked as '-') "+" = Package isn't installed, but will be the next time you run "yum upgrade" or "yum group upgrade foo" " " = Package is installed, but wasn't installed via the group (so "group remove foo" won't remove it). "=" = Package is installed, and was installed via the group. you can move an installed package into an installed group using either "group mark package-sync/package-sync-forced" or "yumdb set group_member". "group summary" is used to give a quick summary of how many groups are installed and available. "group mark" and "group unmark" are used when groups are config‐ ured in group_command=objects mode. These commands then allow you to alter yum's idea of which groups are installed, and the packages that belong to them. "group mark install" mark the group as installed. When installed "yum upgrade" and "yum group upgrade" will install new packages for the group (only those packages already installed will be marked as members of the installed group to start with). "group mark remove" the opposite of mark install. "group mark packages" takes a group id (which must be installed) and marks any given installed packages (which aren't members of a group) as members of the group. Note that the data from the repositories does not need to specify the packages as a member of the group. "group mark packages-force" works like mark packages, but doesn't care if the packages are already members of another group. "group mark blacklist" will blacklist all packages marked to be installed for a group. After this command a "yum group upgrade" will not install any new packages as part of the group. "group mark convert-blacklist" "group mark convert-whitelist" "group mark convert" converts the automatic data you get without using groups as objects into groups as objects data, in other words this will make "yum --setopt=group_command=objects groups list" look as similar as possible to the current output of "yum --setopt=group_command=simple groups list". This makes it much easier to convert to groups as objects without having to rein‐ stall. For groups that are installed the whitelist variant will mark all uninstalled packages for the group as to be installed on the next "yum group upgrade", the blacklist variant (current default) will mark them all as blacklisted. "group unmark packages" remove a package as a member from any groups. Seth Vidal yum(8) |