How to update security patches on CentOS/RHEL7
This article mainly introduces the relevant knowledge of how to update security patches on CentOS/RHEL7, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this CentOS/RHEL7 article on how to update security patches. Let's take a look at it.
Configure automatic security updates on CentOS/RHEL7 systems
On the CentOS/RHEL 7ax 6 system, you need to install the following installation package:
# yum update-y; yum install yum-cron-y
After the installation is complete, open / etc/yum/yum-cron.conf and find the following lines, and you must make sure that their values are the same as those shown below
Update_messages = yesdownload_updates = yesapply_updates = yes
The first line indicates that the automatic update command line should look like this:
# yum-security upgrade
Other lines are guaranteed to notify and automatically download and install security upgrades. In order for notifications from root@localhost to be sent to the same account by email (again, you can choose another account, if you want to), the following lines are also required.
Emit_via = emailemail_from = root@localhostemail_to = root enable automatic security updates on CentOS/RHEL 6
By default, the cron task is configured to download and install all updates immediately, but we can change this behavior by changing the following two parameters to yes in the / etc/sysconfig/yum-cron configuration file.
# do not install, just check (valid value: yes | no) do not install CHECK_ONLY=yes#, only check and download (valid value: yes | no) # require CHECK_ONLY=yes (check before you know what to download) DOWNLOAD_ONLY=yes
To enable email notifications about installation package updates, you need to set the MAILTO parameter to a valid email address.
# MAILTO is not set by default, and crond will send the output to itself # (the user who executes cron, here is root) # example: MAILTO=rootMAILTO=admin@tecmint.com
Finally, open and enable the yum-cron service:
-On CentOS/RHEL 7-systemctl start yum-cronsystemctl enable yum-cron- On CentOS/RHEL 6-# service yum-cron start# chkconfig-- level 35 yum-cron on
Congratulations, you have successfully set up an automatic upgrade on the CentOS/RHEL 7 engine 6 system.
This is the end of the article on "how to update security patches on CentOS/RHEL7". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to update security patches on CentOS/RHEL7". If you want to learn more, you are welcome to follow the industry information channel.