yum-cron自動更新

1223 ワード

yum-cron自動更新


インストール:

yum -y install yum-cron

開始:

sudo systemctl start yum-cron

起動時:

sudo systemctl enable yum-cron

ステータスの表示:

sudo systemctl status yum-cron

ログの表示:

cat /var/log/cron | grep yum-daily

更新ログ:

cat /var/log/yum.log | grep Updated

 
 

設定

vim /etc/yum/yum-cron.conf

 
#       
# default      ,  yum update
# security     ,   yum –secruity upgrade
# security-severity:Critical        ,  yum –sec-severity=Critical upgrade
# minimal      ,  yum –bugfix update-minimal
# minimal-security        ,  yum –security update-minimal
# minimal-security-severity:Critical          ,  yum –sec-severity=Critical update-minimal
update_cmd = security
#       
update_messages = yes
#     
download_updates = yes
#     
apply_updates = yes
#     
emit_via = email
#     
email_from = [email protected]
email_to = [email protected]
email_host = localhost