linux yum仓库相关知识 ----day17

一、与yum仓库相关指令

1.缓存rpm包方式一、

修改yum全局配置文件 
[root@zhangwanshun ~]# vim /etc/yum.conf 
[main] 
cachedir=/var/cache/yum/$basearch/$releasever keepcache=1     #启动缓存

2.缓存rpm包方式二

只下载不安装 
[root@www.xuliangwei.com ~]# yum install -y yumplugin-downloadonly       插件 
[root@zhangwanshun ~]# yum install httpd -y -downloadonly --downloaddir=/tmp

3.清除yum缓存

[root@www.xuliangwei.com ~]# yum clean all          #清除所有信息 
[root@www.xuliangwei.com ~]# yum clean packages     #清除本地缓存的软件包

4.了解一下yum的包组有关的命令参数

[root@zhangwanshun ~]# yum groups list   #列出软件包

[root@zhangwanshun ~]# yum groups remove  #删除软件包

[root@zhangwanshun ~]# yum groups install #安装软件包

二、组包相关指令

[root@www.xuliangwei.com ~]# yum groups list    #安装一整个组的软件 
[root@xuliangwei ~]# yum groups install Development tools \ Compatibility libraries \
 Base Debugging Tools

yum删除包组

 [root@zhangwanshun ~]# yum groups remove  -y Base

扩展命令

​yum makecache       #更新软件包缓冲存
​yum reinstall       #重新装

三、搭建本地仓库 (自己访问自己)

1.关闭所有网络仓库
2.安装镜像iso
3.添加一个repo仓库文件


image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容