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