RHEL 8使用yum安装软件包

本地源

1.创建目录:[root@localhost ~]# mkdir /media/cdrom
2.挂载光盘:[root@localhost ~]# vim /etc/fstab +
在这里插入图片描述在这里插入图片描述
3.配置yum源(Rhel 8中yum是dnf-3的软链接):跟7不一样了,光盘挂载本地yum源多了一级目录:BaseOS 是系统的一些软件,而AppStream则是应用软件(实际是DNF的软件管理):
[root@localhost~]#vim/etc/yum.repos.d/cdrom-install.repo
在这里插入图片描述
4.创建缓存:[root@localhost /]# yum makecache
在这里插入图片描述
5.查看当前存在的软件仓库:[root@localhost /]# yum repolist
在这里插入图片描述
6.更新httpd包
[root@localhost ~]# yum install httpd -y

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_43928088/article/details/106753738