LoginSignup
10
10

More than 5 years have passed since last update.

CentOS 7.2でdnfを使う方法

Last updated at Posted at 2017-11-18

dnfとは何か?

dnfとはyumに代わる次世代のパッケージマネージャ。

背景

CentOS 7.2ではdnfがインストールされていないためインストールを行う必要がある。

インストール方法

以下のコマンドでインストールを行った。

wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/dnf-conf-0.6.4-2.sdl7.noarch.rpm
wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/dnf-0.6.4-2.sdl7.noarch.rpm
wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/python-dnf-0.6.4-2.sdl7.noarch.rpm
yum install python-dnf-0.6.4-2.sdl7.noarch.rpm dnf-0.6.4-2.sdl7.noarch.rpm dnf-conf-0.6.4-2.sdl7.noarch.rpm
rm -f python-dnf-0.6.4-2.sdl7.noarch.rpm
rm -f dnf-0.6.4-2.sdl7.noarch.rpm
rm -f dnf-conf-0.6.4-2.sdl7.noarch.rpm

動作確認

httpdのインストールを行う。

dnf -y install httpd

感想

dnfはyumと同じ感覚で使うことができた。コマンドのオプション等もyumを踏襲しているので迷うことはないと思われる。
yumからdnfへの移行はほぼ決定事項らしいので積極的に使っていきたい。

余談

yumからdnfへ移行する理由として、yumがメンテナンスできない状態になっていることや、Pythonが2から3へ移行していることがあげられているが、yumの開発者「セス・ヴィダル」の死亡も大きな要因だったらしい。しかもその死因はひき逃げだったとか…。

10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10