yum 参数详解 - yum在最后的动作的是否确认。

2019年6月28日

yum.conf文件,是yum在执行所读取的全局配置文件,分两块内容,一是main,另外一是 repository,main定义了全局的配置属性,且<br />
必须只有一个main的段落。repository定义了每一个repository/server,允许有一个和多个repository的定义,也可以使用include=path_to_repository<br />
指定仓库/服务器配置文件目录。一般使用的fedora就是使用的后者。<br />
一、先来看main的一些属性<br />
<span class='centos_linux'>
&nbsp;cachedir&nbsp;&nbsp;&nbsp;&nbsp; 是一个存放cache和db文件的目录。默认为/var/cache/yum.<br />
&nbsp;persistdir&nbsp;&nbsp;&nbsp;&nbsp; information that should persist over multiple&nbsp; runs.<br />
&nbsp;keepcache&nbsp;&nbsp;&nbsp;&nbsp; 0或者1的选项配置。决定在成功安装软件包之后是否保持headers和packages的缓存。默认为1,即缓存。<br />
&nbsp;reposdir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 列出yum寻找.repo文件的目录,默认是/etc/yum/repos.d<br />
&nbsp;debuglevel&nbsp;&nbsp;&nbsp; 调试信息的输出级别,范围是0-10,默认级别为2<br />
&nbsp;errorlevel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 错误信息的输出级别,范围是0-10,默认级别为2<br />
&nbsp;logfile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 绝对路径以及要写入的日志文件名称。<br />
&nbsp;gpgcheck&nbsp;&nbsp;&nbsp;&nbsp; 0或者1的选项配置。这个选项告诉yum是否对软件包进行GPG认证检查,<br />
&nbsp;assumeyes&nbsp;&nbsp;&nbsp;&nbsp; 0或者1的选项配置。决定yum在最后的动作的是否确认。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Commmand-line option: -y<br />
alwaysprompt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0或者1的选项配置。(不会翻译)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Either '1' or '0'. Without this option, yum will not prompt for confirmation when the<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list&nbsp; of&nbsp; packages&nbsp; to&nbsp; be installed exactly matches those given on the command line.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Unless assumeyes is enabled, it will still prompt for package removal, or when&nbsp; addi-<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tional packages need to be installed to fulfill dependencies. Default is '1'.<br />
tolerant&nbsp;&nbsp;&nbsp;&nbsp; 宽容的,容忍的。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0或者1的选项配置。一旦激活,yum将忽略所有来自包的错误。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Commmand-line option: -t<br />
exclude&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 列出除去升级和本地的。支持shell的匹配符。。这必须是用空格隔开的。<br />
exactarch&nbsp;&nbsp;&nbsp;&nbsp; 0或者1的选项配置。设置为1时yum的升级仅升级系统当前的架构。例如:一旦你设置了,yum将<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 不会升级你的i386包到i686包。默认为1<br />
installonlypkgs&nbsp;&nbsp; 列出仅系统安装过的包,永远也不会升级的那种。内核就属于此类型。默认的有<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kernel, kernel-smp, kernel-bigmem,&nbsp; nel-enterprise, kernel-debug, kernel-unsupported.<br />
&nbsp;installonly_limit&nbsp;&nbsp; 可以同时在已经安装好的installonlypkgs中列出包的数量,0是禁掉此特性,默认为3<br />
kernelpkgnames&nbsp;&nbsp;&nbsp; 列出内核的包的名称。<br />
showdupesfromrepos&nbsp;&nbsp; 0或者1的选项配置。设置为1时, if you wish to show any duplicate packages from any<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; repository, from package listings like the info or list commands.设置为0,从任何的仓库去看新的包。<br />
obsoletes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 此属性仅作用于升级。它激活yum的旧式的进程逻辑。用于发行版级别的升级。<br />
overwrite_groups&nbsp;&nbsp; 0或者1的选项配置.用于决定yum对于两或更多的仓库所提供的包的组使用相同的名字时的行为。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 如果设置为1,则这组包仅使用最后匹配的。若设置为0,同名的将会全部放到一个大的组里。<br />
enable_group_conditionals&nbsp;&nbsp; 0或者1的选项配置.决定yum是否允许用于有条件的包,默认为1<br />
group_package_types&nbsp;&nbsp;&nbsp; 列出如下类型:属性、默认值、命令。告诉YUM当"groupinstall"被调用时哪一类型的在组里包<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 将被安装。<br />
installroot&nbsp; &nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Specifies an&nbsp; alternative&nbsp; installroot,&nbsp; relative&nbsp; to&nbsp; which&nbsp; all&nbsp; packages&nbsp; will&nbsp; be<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; installed.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Commmand-line option: --installroot<br />
distroverpkg<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The&nbsp; package&nbsp; used by yum to determine the "version" of the distribution. This can be<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; any installed package. Default is 'redhat-release'. You can see&nbsp; what&nbsp; provides&nbsp; this<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; manually by using: "yum whatprovides redhat-release".<br />
&nbsp;diskspacecheck<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Either&nbsp; '0'&nbsp; or '1'. Set this to '0' to disable the checking for sufficient diskspace<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; before a RPM transaction is run. Default is '1' (perform the check).<br />
tsflags<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Comma or space separated list of transaction flags to pass&nbsp; to&nbsp; the&nbsp; rpm&nbsp; transaction<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set. These include 'noscripts', 'notriggers', 'nodocs', 'test', and 'repackage'.&nbsp; You<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; recent Number of days back to look for 'recent' packages added to a repository.&nbsp; Used by the<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list recent command. Default is '7'.<br />
&nbsp;retries<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set the number of times any attempt to retrieve a file should retry before&nbsp; returning<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; an error. Setting this to '0' makes yum try forever. Default is '10'.<br />
&nbsp;keepalive<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Either&nbsp; '0'&nbsp; or&nbsp; '1'.&nbsp; Set whether HTTP keepalive should be used for HTTP/1.1 servers<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; that support it. This can improve transfer speeds by using one connection when&nbsp; down-<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; loading multiple files from a repository. Default is '1'.<br />
&nbsp;timeout<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Number of seconds to wait for a connection before timing out. Defaults to 30 seconds.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This may be too short of a time for extremely overloaded sites.<br />
<br />
&nbsp;http_caching<br />
throttle<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Enable bandwidth throttling for downloads. This option can be expressed as a absolute<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data rate in bytes/sec. An SI prefix (k, M or G) may be&nbsp; appended&nbsp; to&nbsp; the&nbsp; bandwidth<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value (eg. '5.5k' is 5.5 kilobytes/sec, '2M' is 2 Megabytes/sec).<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alternatively,&nbsp; this option can specify the percentage of total bandwidth to use (eg.<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '60%'). In this case the bandwidth option should&nbsp; be&nbsp; used&nbsp; to&nbsp; specify&nbsp; the&nbsp; maximum<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; available bandwidth.<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set to '0' to disable bandwidth throttling. This is the default.<br />
&nbsp;bandwidth<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Use&nbsp; to&nbsp; specify&nbsp; the maximum available network bandwidth in bytes/second.&nbsp; Used with<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the throttle option (above). If throttle is a percentage and bandwidth&nbsp; is&nbsp; '0'&nbsp; then<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bandwidth&nbsp; throttling&nbsp; will&nbsp; be&nbsp; disabled.&nbsp; If&nbsp; throttle&nbsp; is expressed as a data rate<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (bytes/sec) then this option is ignored. Default is '0' (no bandwidth throttling).<br />
commands<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; List of functional commands to run if no functional commands&nbsp; are&nbsp; specified&nbsp; on&nbsp; the<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; command line (eg. "update foo bar baz quux").&nbsp; None of the short options (eg. -y, -e,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -d) are accepted for this option.<br />
<br />
proxy&nbsp; url to the proxy server that yum should use.<br />
&nbsp;proxy_username<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; username to use for proxy<br />
&nbsp; proxy_password<br />
&nbsp; plugins<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Either '0' or '1'. Global switch to enable or disable yum&nbsp; plugins.&nbsp; Default&nbsp; is&nbsp; '0'<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (plugins disabled). See the PLUGINS section of the yum(8) man for more information on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; installing yum plugins.<br />
<br />
&nbsp; pluginpath<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A list&nbsp; of&nbsp; directories&nbsp; where&nbsp; yum&nbsp; should&nbsp; look&nbsp; for&nbsp; plugin&nbsp; modules.&nbsp; Default&nbsp; is<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '/usr/share/yum-plugins' and '/usr/lib/yum-plugins'.<br />
<br />
&nbsp; pluginconfpath<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A&nbsp; list of directories where yum should look for plugin configuration files.&nbsp; Default<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is '/etc/yum/pluginconf.d'.<br />
metadata_expire<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Time (in seconds) after which the metadata will expire. So that if the current&nbsp; meta-<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data downloaded is less than this many seconds old then yum will not update the meta-<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data against the repository.&nbsp; If you find that yum is not downloading information&nbsp; on<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; updates&nbsp; as&nbsp; often&nbsp; as&nbsp; you&nbsp; would&nbsp; like lower the value of this option. You can also<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; change from the default of using seconds to using days, hours or minutes by appending<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a&nbsp; d, h or m respectivley.&nbsp; The default is 1.5 hours, to compliment yum-updatesd run-<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ning once an hour.&nbsp; It's also possible to use the&nbsp; word&nbsp; "never",&nbsp; meaning&nbsp; that&nbsp; the<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; metadata will never expire.<br />
mirrorlist_expire<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Time (in seconds) after which the mirro &nbsp;<br />
&nbsp; mdpolicy<br />
&nbsp; multilib_policy
</span>

没有评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注