Install DNF On CentOS 7

DNF (short for “DaNdiFied Yum”) is the next upcoming major version of Yum, a package manager for RPM-based Linux distributions, such as RHEL, CentOS, and Fedora. DNF is first introduced in Fedora 18, and it has became the default package manager from Fedora 25 version. This brief tutorial will explain how to install DNF on CentOS 7 and RHEL 7 versions.

Install DNF On CentOS 7

$ sudo yum install dnf
$ dnf help

บางโปรแกรมเช่น neofetch อยู่ใน dnf-plugins-core ต้องติดตั้ง dnf-plugins-core แล้วก็ enable ก่อน ถึงจะติดตั้งได้

$ sudo yum install neofetch
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.bfsu.edu.cn
 * epel: mirrors.tuna.tsinghua.edu.cn
 * extras: ftp.sjtu.edu.cn
 * updates: ftp.sjtu.edu.cn
No package neofetch available.
Error: Nothing to do

ติดตั้ง dnf-plugins-core

$ sudo yum install dnf-plugins-core

Enable COPR repository

$ sudo dnf copr enable konimex/neofetch

เสร็จแล้วค่อยติดตั้ง neofetch อีกครั้งก็จะได้ละ

$ sudo dnf install neofetch