![]() |
◆ | アップデート |
アップデートの実行 |
|
[root@centos]# yum -y update |
|
CentOS のインストール直後はかなりのアップデート 項目がありかなり時間が掛かるがセキュリティー上重要なことなので必ずアップデートを実行 |
|
◆ | yum-cron のインストール |
1日1回(夜間)の自動アップデートを行う yum-cron をインストール |
|
[root@centos]# yum -y install yum-cron |
|
◆ | yum-cron の設定 |
[root@centos]# vi /etc/yum/yum-cron.conf [commands] # What kind of update to use: # default = yum upgrade # security = yum --security upgrade # security-severity:Critical = yum --sec-severity=Critical upgrade # minimal = yum --bugfix upgrade-minimal # minimal-security = yum --security upgrade-minimal # minimal-security-severity:Critical = --sec-severity=Critical upgrade-minimal update_cmd = default # Whether a message should be emitted when updates are available, # were downloaded, or applied. update_messages = yes # Whether updates should be downloaded when they are available. download_updates = yes # Whether updates should be applied when they are available. Note # that download_updates must also be yes for the update to be applied. apply_updates = no <--- 書き換え ↓ apply_updates = yes 以下略 |
|
上記設定は更新の有無を確認して更新があれば自動的にダウンロード及びアップデートを行う | |
◆ | yum-cron の起動。 |
[root@centos]# systemctl start yum-cron |
|
yum-cron の自動起動設定 | |
[root@centos]# systemctl enable yum-cron |
|
自動起動設定の確認 | |
[root@centos]# systemctl list-unit-files | grep yum-cron yum-cron.service enabled <--- enabled になっていればOK |
|