关于yum

一. yum是什么

  yum = Yellow dog Updater, Modified主要功能是更方便的添加/删除/更新RPM包.它能自动解决包的倚赖性问题.

  它能便于管理大量系统的更新问题

  注:为什么要使用yum而不用apt,最简单的原因,Fedora自带

  二. yum特点

  *可以同时配置多个资源库(Repository)

  *简洁的配置文件(/etc/yum.conf)

  *自动解决增加或删除rpm包时遇到的倚赖性问题

  *使用方便

  *保持与RPM数据库的一致性

 

三 yum的配置文件:

[root@rcc-pok-idg-1998 test]# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

# Default.
# installonly_limit = 3

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

四:yum的一些命令:

 *rpm包的更新

  检查可更新的rpm包

  #yum check-update

  更新所有的rpm包

 

  #yum update

  更新指定的rpm包,如更新kernel和kernel source

  #yum update kernel kernel-source

  大规模的版本升级,与yum update不同的是,连旧的淘汰的包也升级

 

  #yum upgrade

  *rpm包的安装和删除

  安装rpm包,如xmms-mp3

 

  #yum install xmms-mp3

  删除rpm包,包括与该包有倚赖性的包

  #yum remove licq

  注:同时会提示删除licq-gnome,licq-qt,licq-text

 

  *yum暂存(/var/cache/yum/)的相关参数

  清除暂存中rpm包文件

  #yum clean packages

 

  清除暂存中rpm头文件

  #yum clean headers

  清除暂存中旧的rpm头文件

  #yum clean oldheaders

 

  清除暂存中旧的rpm头文件和包文件

  #yum clean或#yum clean all

  注:相当于yum clean packages + yum clean oldheaders

 

  *rpm包列表

  列出资源库中所有可以安装或更新的rpm包

  #yum list

  列出资源库中特定的可以安装或更新以及已经安装的rpm包

[root@netxc185 redhat]# yum list | more
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Installed Packages
Cluster_Administration-en-US.noarch       5.2-1                   installed
Deployment_Guide-en-US.noarch             5.2-11                  installed
ElectricFence.x86_64                      2.2.2-20.2.2            installed
GConf2.i386                               2.14.0-9.el5            installed
GConf2.x86_64                             2.14.0-9.el5            installed
Global_File_System-en-US.noarch           5.2-1                   installed

 

yum与rpm的区别:

YUM是从软件仓库自动下载,自动安装,自动配置的。
RPM是要你自己下载软件包以及相关的包,之后再依次用rpm命令装完各个包。

 

 

[root@netxc185 redhat]# yum --help
Loaded plugins: rhnplugin, security
usage: yum [options] COMMAND

List of Commands:

check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies
downgrade      downgrade a package
erase          Remove a package or packages from your system
groupinfo      Display details about a package group
groupinstall   Install the packages in a group on your system
grouplist      List available package groups
groupremove    Remove the packages in a group from your system
help           Display a helpful usage message
info           Display details about a package or group of packages
install        Install a package or packages on your system
list           List a package or groups of packages
localinstall   Install a local RPM
makecache      Generate the metadata cache
provides       Find what package provides the given value
reinstall      reinstall a package
repolist       Display the configured software repositories
resolvedep     Determine which package provides the given dependency
search         Search package details for the given string
shell          Run an interactive yum shell
update         Update a package or packages on your system
upgrade        Update packages taking obsoletes into account


options:
  -h, --help            show this help message and exit
  -t, --tolerant        be tolerant of errors
  -C                    run entirely from cache, don't update cache
  -c  [config file]     config file location
  -R  [minutes]         maximum command wait time
  -d  [debug level]     debugging output level
  --showduplicates      show duplicates, in repos, in list/search commands
  -e  [error level]     error output level
  -q, --quiet           quiet operation
  -v, --verbose         verbose operation
  -y                    answer yes for all questions
  --version             show Yum version and exit
  --installroot=[path]  set install root
  --enablerepo=[repo]   enable one or more repositories (wildcards allowed)
  --disablerepo=[repo]  disable one or more repositories (wildcards allowed)
  -x [package], --exclude=[package]
                        exclude package(s) by name or glob
  --disableexcludes=[repo]
                        disable exclude from main, for a repo or for
                        everything
  --obsoletes           enable obsoletes processing during updates
  --noplugins           disable Yum plugins
  --nogpgcheck          disable gpg signature checking
  --disableplugin=[plugin]
                        disable plugins by name
  --enableplugin=[plugin]
                        enable plugins by name
  --skip-broken         skip packages with depsolving problems
  --color=COLOR         control whether color is used
  --security            Include security relevant packages
  --cve=CVE             Include packages needed to fix the given CVE
  --bz=BZ               Include packages needed to fix the given BZ
  --advisory=ADVISORY   Include packages needed to fix the given advisory

  Plugin Options:

 

附:

Linux add user:

 

useradd zhyingsh

 

 语  法:whoami [--help][--version]
  补充说明:显示自身的用户名称,本指令相当于执行"id -un"指令。

 

你可能感兴趣的:(list,redhat,include,plugins,debugging,Duplicates)