zoukankan      html  css  js  c++  java
  • centos7 安装dnf包管理器和常用命令

    Installing DNF

    Currently the DNF package comes from the EPEL repository, so if your Linux system is not already configured to use this repository, simply run the command below to set it up.

    [root@centos7 ~]# yum install epel-release -y
    

    Now that EPEL is ready to use, simply install the dnf package as shown below.

    [root@centos7 ~]# yum install dnf -y
    

    So we’re using a package manager to install a package manager, kind of meta. I was wondering if DNF would attempt to remove Yum during installation, but it did not and it appears that they are capable of working along side each other.

    Using DNF

    Now that DNF is installed we can use it in place of Yum. Most of the commands appear to be of the same syntax which makes things much easier, for example:

    Installing a package

    dnf install httpd
    

    Updating a package

    dnf update httpd
    

    Viewing history

    dnf history
    

    Uninstall a package

    dnf remove httpd
    

    Check out the man page for further information.

  • 相关阅读:
    Object有哪些公用方法?(转)
    equals和==的区别(转)
    switch语句中case的标签
    (常见面试问题)九种基本数据类型的大小,以及他们的封装类
    English
    plot
    文件读写
    标准化
    独热编码
    一阶逻辑
  • 原文地址:https://www.cnblogs.com/kzwrcom/p/6394016.html
Copyright © 2011-2022 走看看