Installation and Configuration of DNF-Automatic
To begin, you need to install the dnf-automatic
package. You can do this by executing the following command:
Once installed, it’s time to configure dnf-automatic
. The configuration file is located at /etc/dnf/automatic.conf
. You can edit this file with your preferred text editor to tailor the update process to your needs.
Here are some important parameters you might want to configure:
- apply_updates: Set this to
yes
if you want updates to be applied automatically. - download_updates: If you prefer to only download updates and apply them manually, set this to
yes
. - emit_via: This option determines how you’ll be notified of available updates. Options include
email
,stdio
, ormotd
(Message of the Day). - email_from: If using email notifications, specify the sender’s email address here.
- email_to: The recipient’s email address for notifications.
After configuring dnf-automatic
, you need to enable and start the service:
This command will ensure that the dnf-automatic
service starts automatically and adheres to the schedule you’ve configured.
Customizing the Update Schedule
By default, dnf-automatic is set to check for updates daily. However, you might want to adjust this frequency. The timer configuration is managed by systemd’s timer units. You can view the current timer settings with:
If you wish to modify the schedule, create a drop-in file to override the default settings without modifying the main unit file:
Add your customized schedule in the format of a systemd timer:
This example would switch the update checks to a weekly basis. Save and close the file, then restart the timer to apply your changes:
Monitoring and Logs
It’s important to monitor the automatic updates to ensure they are running as expected. Logs for dnf-automatic can be found through the journal:
This command will display a detailed log, allowing you to review past update actions and troubleshoot if necessary.