在 kickstart 文件里使用 %packages
命令来列出你想安装的软件包(仅用于全新安装,升级安装时不支持软件包指令)。
Packages can be specified by group or by individual package name, including with globs using the asterisk. The installation program defines several groups that contain related packages. Refer to the variant
/repodata/comps-*.xml
file on the first Fedora CD-ROM for a list of groups. Each group has an id, user visibility value, name, description, and package list. In the package list, the packages marked as mandatory are always installed if the group is selected, the packages marked default are selected by default if the group is selected, and the packages marked optional must be specifically selected even if the group is selected to be installed.
多数情况下,你只需要列出想安装的组而不是单个的软件包。注意 Core
和 Base
组总是缺省被选择,所以并不需要在 %packages
部分指定它们。
这里是一个 %packages
选择的示例:
%packages
@ X Window System
@ GNOME Desktop Environment
@ Graphical Internet
@ Sound and Video dhcp
如你所看到的,组被指定了,每个一行,用 @
符号开头,后面是 comps.xml
文件里给出的组全名。组也可以用组的 id 指定,如 gnome-desktop
。不需要额外字符就可以指定单独的软件包(上例里的 dhcp
行就是一个单独的软件包)。
你还可以从默认的软件包列表中指定要不安装的软件包:
-autofs
%packages
指令也支持下面的选项:
--nobase
不要安装 @Base 组。如果你想创建一个很小的系统,你可以使用这个选项。
--resolvedeps
--resolvedeps 选项已经被取消了。目前依赖关系可以自动地被解析。
--ignoredeps
--ignoredeps 选项已经被取消了。目前依赖关系可以自动地被解析。
--ignoremissing
忽略缺少的软件包或软件包组,而不是暂停安装来向用户询问是中止还是继续安装。例如:
%packages --ignoremissing