RHCSA第七天

一、RPM管理工具

1、使用rmp安装zsh(忽略依赖关系)

下载安装包

上传到linux

安装成功

2、查询是否已安装

3、卸载zsh

4、查询所有已安装软件

输入命令rpm  -qa

5、查询date命令所在软件包

6、查询未安装的zsh的文件信息

输入命令rpm  -ql  zsh

二、YUM管理工具

1、yum本地源配置

2、yum网络源配置

3、安装httpd软件

[root@redamancy yum.repos.d]# yum install httpd
正在更新 Subscription Management 软件仓库。
无法读取客户身份
 
本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。
 
BaseOS                                                                                                                                                      2.7 MB/s | 2.8 kB     00:00    
AppStream                                                                                                                                                   3.1 MB/s | 3.2 kB     00:00    
依赖关系解决。
============================================================================================================================================================================================
 软件包                                       架构                             版本                                                               仓库                                 大小
============================================================================================================================================================================================
安装:
 httpd                                        x86_64                           2.4.37-41.module+el8.5.0+11772+c8e0c271                            AppStream                           1.4 M
安装依赖关系:
 apr                                          x86_64                           1.6.3-12.el8                                                       AppStream                           130 k
 apr-util                                     x86_64                           1.6.1-6.el8                                                        AppStream                           105 k
 httpd-filesystem                             noarch                           2.4.37-41.module+el8.5.0+11772+c8e0c271                            AppStream                            39 k
 httpd-tools                                  x86_64                           2.4.37-41.module+el8.5.0+11772+c8e0c271                            AppStream                           106 k
 mod_http2                                    x86_64                           1.15.7-3.module+el8.4.0+8625+d397f3da                              AppStream                           154 k
 redhat-logos-httpd                           noarch                           84.5-1.el8                                                         BaseOS                               29 k
安装弱的依赖:
 apr-util-bdb                                 x86_64                           1.6.1-6.el8                                                        AppStream                            25 k
 apr-util-openssl                             x86_64                           1.6.1-6.el8                                                        AppStream                            27 k
启用模块流:
 httpd                                                                         2.4                                                                                                         
 
事务概要
============================================================================================================================================================================================
安装  9 软件包
 
总计:2.0 M
安装大小:5.4 M
确定吗?[y/N]: y
下载软件包:
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
  准备中  :                                                                                                                                                                             1/1 
  安装    : apr-1.6.3-12.el8.x86_64                                                                                                                                                     1/9 
  运行脚本: apr-1.6.3-12.el8.x86_64                                                                                                                                                     1/9 
  安装    : apr-util-bdb-1.6.1-6.el8.x86_64                                                                                                                                             2/9 
  安装    : apr-util-openssl-1.6.1-6.el8.x86_64                                                                                                                                         3/9 
  安装    : apr-util-1.6.1-6.el8.x86_64                                                                                                                                                 4/9 
  运行脚本: apr-util-1.6.1-6.el8.x86_64                                                                                                                                                 4/9 
  安装    : httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                  5/9 
  运行脚本: httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0c271.noarch                                                                                                             6/9 
  安装    : httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0c271.noarch                                                                                                             6/9 
  安装    : redhat-logos-httpd-84.5-1.el8.noarch                                                                                                                                        7/9 
  安装    : mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_64                                                                                                                      8/9 
  安装    : httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                        9/9 
  运行脚本: httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                        9/9 
  验证    : redhat-logos-httpd-84.5-1.el8.noarch                                                                                                                                        1/9 
  验证    : apr-1.6.3-12.el8.x86_64                                                                                                                                                     2/9 
  验证    : apr-util-1.6.1-6.el8.x86_64                                                                                                                                                 3/9 
  验证    : apr-util-bdb-1.6.1-6.el8.x86_64                                                                                                                                             4/9 
  验证    : apr-util-openssl-1.6.1-6.el8.x86_64                                                                                                                                         5/9 
  验证    : httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                        6/9 
  验证    : httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0c271.noarch                                                                                                             7/9 
  验证    : httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                  8/9 
  验证    : mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_64                                                                                                                      9/9 
已更新安装的产品。
 
已安装:
  apr-1.6.3-12.el8.x86_64                                       apr-util-1.6.1-6.el8.x86_64                               apr-util-bdb-1.6.1-6.el8.x86_64                                   
  apr-util-openssl-1.6.1-6.el8.x86_64                           httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64      httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0c271.noarch   
  httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64    mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_64    redhat-logos-httpd-84.5-1.el8.noarch                              
 
完毕!

4、查看vim命令属于哪个软件包

[root@redamancy yum.repos.d]# yum provides vim
正在更新 Subscription Management 软件仓库。
无法读取客户身份
 
本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。
 
上次元数据过期检查:0:01:50 前,执行于 2022年04月12日 星期二 20时13分26秒。
vim-enhanced-2:8.0.1763-16.el8.x86_64 : A version of the VIM editor which includes recent enhancements
仓库        :@System
匹配来源:
提供    : vim = 8.0.1763-16.el8
 
vim-enhanced-2:8.0.1763-16.el8.x86_64 : A version of the VIM editor which includes recent enhancements
仓库        :AppStream
匹配来源:
提供    : vim = 8.0.1763-16.el8
 

5、yum卸载httpd

[root@redamancy yum.repos.d]# yum remove httpd
正在更新 Subscription Management 软件仓库。
无法读取客户身份
 
本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。
 
依赖关系解决。
============================================================================================================================================================================================
 软件包                                       架构                             版本                                                              仓库                                  大小
============================================================================================================================================================================================
移除:
 httpd                                        x86_64                           2.4.37-41.module+el8.5.0+11772+c8e0c271                           @AppStream                           4.3 M
清除未被使用的依赖关系:
 apr                                          x86_64                           1.6.3-12.el8                                                      @AppStream                           272 k
 apr-util                                     x86_64                           1.6.1-6.el8                                                       @AppStream                           230 k
 apr-util-bdb                                 x86_64                           1.6.1-6.el8                                                       @AppStream                            12 k
 apr-util-openssl                             x86_64                           1.6.1-6.el8                                                       @AppStream                            20 k
 httpd-filesystem                             noarch                           2.4.37-41.module+el8.5.0+11772+c8e0c271                           @AppStream                           400  
 httpd-tools                                  x86_64                           2.4.37-41.module+el8.5.0+11772+c8e0c271                           @AppStream                           194 k
 mod_http2                                    x86_64                           1.15.7-3.module+el8.4.0+8625+d397f3da                             @AppStream                           394 k
 redhat-logos-httpd                           noarch                           84.5-1.el8                                                        @BaseOS                              8.2 k
 
事务概要
============================================================================================================================================================================================
移除  9 软件包
 
将会释放空间:5.4 M
确定吗?[y/N]: y
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
  准备中  :                                                                                                                                                                             1/1 
  运行脚本: httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                        1/1 
  运行脚本: httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                        1/9 
  删除    : httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                        1/9 
  运行脚本: httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                        1/9 
  删除    : httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0c271.noarch                                                                                                             2/9 
  运行脚本: httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0c271.noarch                                                                                                             2/9 
  删除    : redhat-logos-httpd-84.5-1.el8.noarch                                                                                                                                        3/9 
  删除    : httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                  4/9 
  删除    : apr-util-1.6.1-6.el8.x86_64                                                                                                                                                 5/9 
  运行脚本: apr-util-1.6.1-6.el8.x86_64                                                                                                                                                 5/9 
  删除    : apr-1.6.3-12.el8.x86_64                                                                                                                                                     6/9 
  运行脚本: apr-1.6.3-12.el8.x86_64                                                                                                                                                     6/9 
  删除    : apr-util-bdb-1.6.1-6.el8.x86_64                                                                                                                                             7/9 
  删除    : apr-util-openssl-1.6.1-6.el8.x86_64                                                                                                                                         8/9 
  删除    : mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_64                                                                                                                      9/9 
  运行脚本: mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_64                                                                                                                      9/9 
  验证    : apr-1.6.3-12.el8.x86_64                                                                                                                                                     1/9 
  验证    : apr-util-1.6.1-6.el8.x86_64                                                                                                                                                 2/9 
  验证    : apr-util-bdb-1.6.1-6.el8.x86_64                                                                                                                                             3/9 
  验证    : apr-util-openssl-1.6.1-6.el8.x86_64                                                                                                                                         4/9 
  验证    : httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                        5/9 
  验证    : httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0c271.noarch                                                                                                             6/9 
  验证    : httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64                                                                                                                  7/9 
  验证    : mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_64                                                                                                                      8/9 
  验证    : redhat-logos-httpd-84.5-1.el8.noarch                                                                                                                                        9/9 
已更新安装的产品。
 
已移除:
  apr-1.6.3-12.el8.x86_64                                       apr-util-1.6.1-6.el8.x86_64                               apr-util-bdb-1.6.1-6.el8.x86_64                                   
  apr-util-openssl-1.6.1-6.el8.x86_64                           httpd-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64      httpd-filesystem-2.4.37-41.module+el8.5.0+11772+c8e0c271.noarch   
  httpd-tools-2.4.37-41.module+el8.5.0+11772+c8e0c271.x86_64    mod_http2-1.15.7-3.module+el8.4.0+8625+d397f3da.x86_64    redhat-logos-httpd-84.5-1.el8.noarch                              
 
完毕!

6、清理缓存

[root@redamancy yum.repos.d]# yum clean packages all
正在更新 Subscription Management 软件仓库。
无法读取客户身份
 
本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。
 
13 文件已删除

7、重新创建缓存

[root@redamancy yum.repos.d]# yum makecache
正在更新 Subscription Management 软件仓库。
无法读取客户身份
 
本系统尚未在权利服务器中注册。可使用 subscription-manager 进行注册。
 
BaseOS                                                                                                                                                       45 MB/s | 2.4 MB     00:00    
AppStream                                                                                                                                                    67 MB/s | 7.2 MB     00:00    
上次元数据过期检查:0:00:01 前,执行于 2022年04月12日 星期二 20时18分49秒。
元数据缓存已建立。
 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值