亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Table of Contents
Configuration file location and basic settings
Enable and run the yum-cron service
Compatibility issues under DNF system
Log viewing and email notification settings
Home Operation and Maintenance Linux Operation and Maintenance How to use `yum-cron` for automatic updates yum dnf

How to use `yum-cron` for automatic updates yum dnf

Sep 13, 2025 am 03:09 AM
Automatic updates yum-cron

How to use `yum-cron` for automatic updates yum dnf

Automatic update of system patches and software packages is an important part of maintaining the security of Linux servers. If you are using a RHEL-based system, such as CentOS or Rocky Linux, yum-cron is a simple and effective tool to achieve this goal.

Below are some practical suggestions to help you use yum-cron to complete the automatic update task.


Configuration file location and basic settings

The configuration files for yum-cron are usually located in /etc/yum/yum-cron.conf and /etc/yum/yum-cron-hourly.conf (if you enable hourly checks). The former is used for daily daily update tasks, while the latter is used for more frequent checks.

The main configuration items include:

  • update_cmd : Specify the update method, which can be default , security , or minimal , etc.
  • update_packages : Optional, specifying that only certain specific packages are updated
  • download_updates and apply_updates : Controls whether to automatically download and install updates
  • system_name : Set the host name to display when mail notifications

Remember to restart the service after modifying the configuration:

 sudo systemctl restart yum-cron

Enable and run the yum-cron service

In most modern systems, yum-cron runs as a systemd service. You can enable and start it with the following command:

  • Enable Power-on:

     sudo systemctl enable yum-cron
  • Start the service:

     sudo systemctl start yum-cron

If you want the system to check for updates more actively, you can enable yum-cron-hourly service:

 sudo systemctl enable yum-cron-hourly
sudo systemctl start yum-cron-hourly

Note: These two services may run at the same time. It is recommended to choose one according to your needs to avoid repeated operations.


Compatibility issues under DNF system

Starting from RHEL 8, the default package manager has been replaced with dnf , but yum-cron has actually been transformed into a version that uses dnf command. That is to say, in newer systems you can still use yum-cron , which calls dnf behind it.

But be aware of:

  • The installation package name may be different, for example, in some distributions it is dnf-automatic
  • The configuration file path may be slightly different, and some systems will place the configuration in the /etc/dnf/ directory
  • If you encounter compatibility issues, you can consider using dnf-automatic directly as a substitute

Log viewing and email notification settings

To ensure that the update is going on properly, you should check the logs regularly. By default, yum-cron will write output to the system's log, usually /var/log/messages or viewed through journalctl :

 journalctl -u yum-cron

If you want to receive email notifications, you can set it in the configuration file:

  • email_to : email address to receive notifications
  • email_from : sender address
  • emit_via : Select email or stdio to decide whether to send it via email

In addition, make sure that the system has available mail transfer agents (such as sendmail or ssmtp ) configured.


Basically that's it. As long as the configuration is properly, yum-cron can silently ensure the system security without disturbing you. The key is to check the log regularly to confirm that there are no omissions or failures.

The above is the detailed content of How to use `yum-cron` for automatic updates yum dnf. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

ArtGPT

ArtGPT

AI image generator for creative art from text prompts.

Stock Market GPT

Stock Market GPT

AI powered investment research for smarter decisions

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

How to disable Windows Update from automatically updating drivers in win11? How to disable Windows Update from automatically updating drivers in win11? Jun 26, 2024 am 12:18 AM

When you connect any new hardware device to the system, Windows will automatically try to install the driver for it. When the system's built-in driver package cannot be recognized, it will automatically try to connect to Windows Update to search and install the driver. Windows can also automatically update device drivers through Windows Update without user interaction. Although this function seems convenient, under certain circumstances, the feature of automatically updating drivers can cause trouble for users. For example, users' video workflows such as DaVinciResolve, Adobe Premiere, etc. need to use a specific old version of Nvidia Studio driver. As a result, Windows

How to turn off automatic updates permanently in win11 How to turn off automatic updates permanently in win11 Mar 27, 2024 pm 04:43 PM

Turn off method: 1. Turn off updates through system settings; 2. Disable Windows Update service through Service Manager; 3. Use Group Policy rules (Professional version or higher only).

How to disable automatic updates in Win11 How to disable automatic updates in Win11 Dec 27, 2023 pm 12:53 PM

Many users always receive automatic updates from the system when using their computers on a daily basis, which not only slows down the computer but also causes it to become stuck. For this reason, today we bring you how to operate Win11 if you don’t want to automatically update. If automatic updates keep affecting you, Let’s see how to close it. How to prevent Windows 11 system from automatically updating 1. First, right-click "This PC" on the desktop and select "Manage". 2. In the opened "Computer Management", click "Services" → "Applications" → "Services" → "Windows update". 3. Next, double-click "Windows update", set the "Startup type" to "Disabled", click "Stop" service and confirm. 4. Click the "Recover" tab to restore the first lost

Group policy method to turn off automatic updates in win10 Group policy method to turn off automatic updates in win10 Dec 23, 2023 pm 05:07 PM

When using win10 system, we all often encounter update problems. This update is sometimes very annoying, so how can we solve this problem? This requires us to enter the local group policy to set it. How to turn off automatic updates in Win10 Group Policy: 1. Press "win+R" on the keyboard to open Run, enter "gpedit.msc" and click OK. 2. Select "Administrative Templates" - "Windows Components" and double-click to enter. 3. Then find "Windows Update" and double-click to enter. 4. Find "Configure automatic updates" on the right and double-click to open it. 5. Then check "Disabled" and click "Apply".

How to develop a feature that automatically updates a WordPress plugin How to develop a feature that automatically updates a WordPress plugin Sep 05, 2023 am 10:40 AM

How to Develop an Auto-Updating WordPress Plugin WordPress is a very popular open source content management system (CMS) with a rich plugin market to extend its functionality. To ensure that plugins are always up to date and secure, developers need to implement automatic updates. In this article, we’ll walk you through how to develop an auto-updating WordPress plugin and provide code examples to help you get started quickly. Preparation Before starting development, you need to prepare the following key steps: Create

How to turn off automatic updates on Redmi 13c? How to turn off automatic updates on Redmi 13c? Mar 04, 2024 pm 09:49 PM

Today’s mobile phones are becoming more and more powerful, with more and more comprehensive functions, and also provide users with a more comfortable experience. As the latest new model released, Redmi13C also has many functions and also provides users with There are many new designs coming, so how to turn off automatic updates on Redmi 13c? Let the editor of this website briefly introduce the functions to you. If you need it, you can come and take a look. How to turn off automatic updates on Redmi 13c? 1. Open the phone settings and click My Device. 2. Click MIUI version. 3. Click on the three dots in the upper right corner. 4. Click System Update Settings. 5. Turn off the switches behind automatic downloads and smart updates. It is necessary to know about turning off automatic updates. The above is the Redmi 13

How to cancel automatic updates in win10 safe mode How to cancel automatic updates in win10 safe mode Jan 06, 2024 pm 11:52 PM

When many users use computers, sometimes a malfunction occurs and they can only operate in safe mode. However, safe mode is always updated automatically, causing unnecessary trouble. In fact, the method of shutting down is not difficult, just disable it. . How to cancel automatic updates in win10 safe mode: 1. Press the keyboard "Win+R" and enter "services.msc" in the run box and click "OK" 2. Find "Windows Update" in the pop-up service 3. Change the "Startup type" Change it to disabled and click "Apply"

How does Kirin OS provide automatic update and upgrade functions? How does Kirin OS provide automatic update and upgrade functions? Aug 06, 2023 pm 05:49 PM

How does Kirin OS provide automatic update and upgrade functions? With the continuous advancement of technology and the increasing importance of operating systems, users have increasingly higher requirements for the stability, security and functions of operating systems. In order to meet the needs of users, the operating system needs to provide automatic updates and upgrades, fix vulnerabilities and add new features in a timely manner. As a domestically developed operating system, Kirin operating system is no exception. It provides automatic update and upgrade functions. In the Kirin operating system, the automatic update and upgrade functions are mainly through the software package manager and update software.

See all articles