Centos 软件包管理 --yum

1 yum 配置文件

/etc/yum.conf    为公共仓位系统公共配置

/etc/yum.repos.d/*.repo  为仓库指向提供配置信息

仓库的定义:

  [repositoryid]

  name=Some name for this repository
  baseurl=url://path/to/repository/
 enabled={0|1}      Either ‘1’ or ‘0’. This tells yum whether or not use this repository.

 gpgcheck={0|1}    Either ‘1’ or ‘0’.

 failovermethod=roundrobin    Either ‘roundrobin’ or ‘priority’.轮询 or 优先级

  cost=1000              relative cost of accessing this repository.开销,默认1000

命名 *.repo

 yum repolist [all|enabled|disabled] 列出当前的仓库,其是指位于/etc/yum.repos.d/的repo文件,既启用的仓库

 yum list [all | glob_exp1] [glob_exp2] [...]
              List all available and installed packages.

       yum l

你可能感兴趣的:(centos基础,yum)