yum-cron을 이용한 자동 업데이트

2021-06-09
yum-cron을 이용한 자동 업데이트

OS : CentOS 7.X

yum-cron 설치
yum install yum-cron

yum-cron 실행
systemctl start yum-cron

yum-cron 자동실행 등록
systemctl enable yum-cron

 

설정파일
vi /etc/yum/yum-cron.conf

[커맨드]
- What kind of update to use:
- default = yum upgrade
- security = yum –security upgrade
- security-severity:Critical = yum –sec-severity=Critical upgrade
- minimal = yum –bugfix update-minimal
- minimal-security = yum –security update-minimal
- minimal-security-severity:Critical = –sec-severity=Critical update-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.
-  yes로 설정시 업데이트가 가능
- download_updates 가 yes로 설정되어 있어야 함
apply_updates = yes

[email]
# The address to send email messages from.
# NOTE: ‘localhost’ will be replaced with the value of system_name.
email_from = [email protected]

# List of addresses to send messages to.
email_to = [email protected] [email protected]

# Name of the host to connect to to send email messages.
email_host = localhost 


 





. yum-cron 시작 및 상태 체크

systemctl start yum-cron

sytstemctl status yum-cron
yum-cron 의 적용은
/etc/cron.daily/0yum-daily.cron  에 의해 동작합니다