提供:すだちWiki
移動先: 案内検索

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

メインページ > Category:自宅サーバー > AlmaLinux 9 で自宅サーバー構築  > パッケージ管理システム設定(AlmaLinux9)

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

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

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

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

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

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

シスログローテーション設定ファイルインストール

[root@host2 ~]# dnf -y install rsyslog-logrotate

ソフトウェア更新の自動化

正常に動作してません。後日修正します。

dnf-automaticインストール

[root@host2 ~]# dnf install -y dnf-automatic dnf-utils

DNF Automatic設定ファイル編集

[root@host2 ~]# vi /etc/dnf/automatic.conf ← DNF Automatic設定ファイル編集
# Whether updates should be applied when they are available, by
# dnf-automatic.timer. notifyonly.timer, download.timer and
# install.timer override this setting.
apply_updates = yes ← 利用可能な更新のダウンロードとインストールを自動で行う

ソフトウェア更新の自動化を有効化

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

ソフトウェア更新の自動化を起動

[root@host2 ~]# systemctl start dnf-automatic-install.timer
[root@host2 ~]# systemctl status dnf-automatic.timer
○ dnf-automatic.timer - dnf-automatic timer
     Loaded: loaded (/usr/lib/systemd/system/dnf-automatic.timer; disabled; pre>
     Active: inactive (dead)
    Trigger: n/a
   Triggers: ● dnf-automatic.service