提供:あわWiki
移動先: 案内検索

パッケージ管理システム設定(CentOS8)

メインページ > CentOS_8_で自宅サーバー構築  > パッケージ管理システム設定(CentOS8)

インストール済パッケージの一括アップデート

[root@host3 ~]# dnf -y update
※大量のパッケージのダウンロード/アップデートを行うため時間がかかる

ベース、開発ツールパッケージ群インストール

[root@host3 ~]# dnf -y groupinstall base

[root@host3 ~]# dnf -y groupinstall development

[root@host3 ~]# dnf -y groupinstall network-tools

パッケージ自動更新

[root@host3 ~]# dnf install -y dnf-automatic dnf-utils
  • デフォルトではパッケージの取得だけでインストールはしない
[root@host3 ~]# cp -a /etc/dnf/automatic.conf{,.org}

[root@host3 ~]# sed -i -e 's/^apply_updates = no/apply_updates = yes/' /etc/dnf/automatic.conf
  • パッケージ自動更新起動
[root@host3 ~]# systemctl start dnf-automatic.timer

[root@host3 ~]# systemctl enable dnf-automatic.timer
Created symlink /etc/systemd/system/multi-user.target.wants/dnf-automatic.timer → /usr/lib/systemd/system/dnf-automatic.timer.

[root@host3 ~]# systemctl status dnf-automatic.timer
 dnf-automatic.timer - dnf-automatic timer
   Loaded: loaded (/usr/lib/systemd/system/dnf-automatic.timer; disabled; vendo>
   Active: active (waiting) since Thu 2020-03-19 13:56:32 JST; 10s ago
  Trigger: Fri 2020-03-20 13:56:52 JST; 24h left