check 检测 rpmdb 是否有问题 check-update 检查可更新的包 clean 清除缓存的数据 deplist 显示包的依赖关系 distribution-synchronization 将已安装的包同步到最新的可用版本 downgrade 降级一个包 erase 删除包 groupinfo 显示包组的详细信息 groupinstall 安装指定的包组 grouplist 显示可用包组信息 groupremove 从系统删除已安装的包组 help 删除帮助信息 history 显示或使用交互历史 info 显示包或包组的详细信息 install 安装包 list 显示可安装或可更新的包 makecache 生成元数据缓存 provides 搜索特定包文件名 reinstall 重新安装包 repolist 显示已配置的资源库 resolvedep 指事实上依赖 search 搜索包 shell 进入yum的shell提示符 update 更新系统中的包 upgrade 升级系统中的包 version 显示机器可用源的版本
-h, --help 显示帮助信息
-t, --tolerant 容错
-C, --cacheonly 完全从系统缓存中运行,不更新缓存
-c [config file], --config=[config file]
本地配置文件
-R [minutes], --randomwait=[minutes]
命令最大等待时间
-d [debug level], --debuglevel=[debug level]
设置调试级别
-e [error level], --errorlevel=[error level]
设置错误等级
-q, --quiet 退出运行
-v, --verbose 详细模式
-y, --assumeyes 对所有交互提问都回答“yes”
# 安装软件包 foo yum install foo # 安装 Web server 软件包组 yum groupinsall "Web server"
# 检查可用更新 yum check-update # 全部更机关报 yum update # 更新 foo 软件包 yum update foo # 或 yum upgrade foo # 升级 Web server 软件包组 yum groupupdate "Web server"
# 删除软件 foo yum remove foo # 删除 Web server 软件包组 yum groupremove "Web server"
# 查找名称包含 foo 的软件包 yum search foo # 显示名为 foo 的软件包信息 yum info foo # 显示软件包 foo 的依赖关系 yum deplist foo # 显示软件包组 Web server 的信息 yum groupinfo "Web server" # 显示已安装的软件包 yum list installed
cat /etc/yum.conf
[main] cachedir=/var/cache/yum/$basearch/$releasever # yum 的缓存目录,用于存储下载的RPM包和数据库 keepcache=0 # 安装完成后是否保留软件包,0为不保留(默认为0),1为保留 debuglevel=2 # Debug 信息输出等级,范围为0-10,缺省为2 logfile=/var/log/yum.log # yum 日志文件位置,用户通过该文件查询做过的更新 exactarch=1 # 是否只安装和系统架构匹配的软件包。可选项为:1、0,默认 1。设置为1时不会将i686的软件包安装在适合i386的系统中。 obsoletes=1 # update 设置,是否允许更新陈旧的RPM包,相当于upgrade gpgcheck=1 # 是否进行 GPG(GNU Private Guard) 校验,以确定rpm 包的来源是有效和安全。当在这个选项设置在[main]部分,则对每个repository 都有效 plugins=1 # 是否启用插件,默认1为允许,0表示不允许 exclude=*.i?86 kernel kernel-xen kernel-debug # 排除某些软件在升级名单之外,可以用通配符,各个项目用空格隔开 installonly_limit=5 # 可同时安装多少程序包 bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum # Bug 追踪路径 distroverpkg=centos-release # 当前发行版版本号 # PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d
$ # ll 总用量 16 -rw-r--r--. 1 root root 1926 6月 26 2012 CentOS-Base.repo -rw-r--r--. 1 root root 637 6月 26 2012 CentOS-Debuginfo.repo -rw-r--r--. 1 root root 626 6月 26 2012 CentOS-Media.repo -rw-r--r--. 1 root root 2593 6月 26 2012 CentOS-Vault.repo
vi CentOS-Media.repo
# CentOS-Media.repo # # This repo is used to mount the default locations for a CDROM / DVD on # CentOS-6. You can use this repo and yum to install items directly off the # DVD ISO that we release. # # To use this repo, put in your DVD and use it with the other repos too: # yum --enablerepo=c6-media [command] # # or for ONLY the media repo, do this: # # yum --disablerepo=* --enablerepo=c6-media [command] [c6-media] name=CentOS-$releasever - Media # 本地源路径 baseurl=file:///media/CentOS/ file:///media/cdrom/ file:///media/cdrecorder/ gpgcheck=1 # enabled=0 # 启用本地源 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[contrib] name=CentOS-$releasever - Contrib mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有