使用dnf管理软件包

dnf(软件仓库):集中提供软件安装包,并提供依赖关系支持
RHEL8中默认使用的软件批量管理工具由RHEL7版本的yum换成了速度更快的dnf,原有的yum命令仅为dnf的软链接,当然依旧可以使用的。
dnf源文件所在目录依旧为/etc/yum.repos.d/
[root@rhel8 rhel8]# vim /etc/yum.repos.d/rhel8.repo //仓库名字以 .repo结尾
[rhel8]                                                 //仓库标识
name=rhel8                                          //仓库名字
baseurl=file:///mnt/rhel8/AppStream                 //软件存放路径
enabled=1                                               //开机自启动
gpgcheck=0                                          //不检测红帽签名

dnf repolist                    //列出可用软件
dnf  list   软件名             //搜索指定软件
dnf list installed              //列出所有安装的RPM软件 
dnf install 软件名         //安装软件
dnf clean all                   //清除仓库缓存
dnf update  软件名         //升级软件
dnf remove  软件名         //卸载软件



猜你喜欢

转载自blog.51cto.com/11614993/2669601