Product SiteDocumentation Site

13.5. Package Selection

在 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.
多​数​情​况​下​,你​只​需​要​列​出​想​安​装​的​组​而​不​是​单​个​的​软​件​包​。​注​意 CoreBase 组​总​是​缺​省​被​选​择​,所​以​并​不​需​要​在 %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