加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

yum 常用命令

发布时间:2020-12-15 23:26:52 所属栏目:安全 来源:网络整理
导读:yum 常用命令 查看yum安装源 [[email?protected] ~]# yum repolist allLoaded plugins: fastestmirror,prioritiesRepository base is listed more than once in the configurationRepository updates is listed more than once in the configurationReposito

yum 常用命令

查看yum安装源

[[email?protected] ~]# yum repolist all
Loaded plugins: fastestmirror,priorities
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * epel: mirrors.tuna.tsinghua.edu.cn
 * extras: mirrors.cqu.edu.cn
 * updates: mirrors.aliyun.com
repo id                       repo name                                                    status
C7.0.1406-base/x86_64         CentOS-7.0.1406 - Base                                       disabled
C7.0.1406-centosplus/x86_64   CentOS-7.0.1406 - CentOSPlus                                 disabled
C7.0.1406-extras/x86_64       CentOS-7.0.1406 - Extras                                     disabled

安装软件

yum install packagename #安装指定包
yun groupinstall groupname #安装程序组

更新和升级

yum update packagename #更新指定包
yum check-update #检查可更新的安装包
yum upgrade packagename #升级指定包
yum groupupdate groupname #升级指定程序组

查找和显示包信息

yum info packagename #显示安装包信息
yum list #显示已安装包和可安装包
yum list  packagename #显示指定包安装情况
yum list groupinfo groupname #显示程序组groupname
yum search string #根据关键词查找包

删除

yum remove/erase packagename #卸载程序包
yum groupremove groupname #卸载程序组
yum deplist packagename #查看包package的依赖情况

清理本地缓存

yum clean all 

#清楚插件缓存
yum clean plugins

构建缓存

yum makecache

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读