day17 2019.8.15
- yum对仓库的相关指令(了解即可)
- 1.列出yum源可用的软件仓库
[root@kuangjie ~]# yum repolist
[root@kuangjie ~]# yum repolist all #查看所有仓库
[root@kuangjie ~]# yum install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
[root@kuangjie ~]# yum-config-manager --disable mysql80-community #关闭仓库
[root@kuangjie ~]# yum-config-manager --enable mysql80-community #启用仓库
[root@kuangjie ~]# rpm -qf $(which cd)
bash-4.2.46-31.el7.x86_64
# rpm需要知道命令的绝对路径,如果不存在该命令是无法查到该命令所属软件包
[root@kuangjie ~]# yum provides cd
# yum通过已启用的仓库进行查找那些软件包中涵盖了需要查询的命令,联网查询
[root@kuangjie ~]# vim /etc/yum.conf #yum全局配置文件
cachedir=/var/cache/yum/$basearch/$releasever #缓存位置
keepcache=1 #启动缓存
# 只下载不安装
[root@kuangjie ~]#yum install httpd -y --downloadonly --downloaddir=/tmp
# 清除yum缓存
[root@kuangjie ~]# yum clean all #清除所有信息
[root@kuangjie ~]# yum clean packages #清除缓存的软件包
[root@kuangjie ~]# yum groups list
[root@kuangjie ~]# yum groups install Development tools
[root@kuangjie ~]# yum groups remove