Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
Refactor the yum-cron steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Pravanjan Hota committed Apr 7, 2023
1 parent 304b36c commit d4b0ba5
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ RHEL 6 and CentOS 6 Rackspace public cloud servers:
After you have saved the file, the following message displays stating that
the file was properly written:

"/etc/yum/yum-cron.conf" 81L, 2620C written
"/etc/sysconfig/yum-cron" 81L, 2620C written

5. Start the `yum-cron` service by running the following command:

Expand All @@ -104,9 +104,10 @@ RHEL 7 and CentOS 7 Rackspace public cloud servers:

$ yum -y install yum-cron

2. To view the `yum-cron` configuration file, use the following command:
2. To view the `yum-cron` configuration file(It is the default config file
used by the `yum-cron` script), use the following command:

$ vi /etc/sysconfig/yum-cron
$ vi /etc/yum/yum-cron.conf

You can also open the file in any text editor.

Expand Down Expand Up @@ -207,11 +208,12 @@ RHEL 7 and CentOS 7 Rackspace public cloud servers:
9. Sometimes, you may need to maintain the version of a package and not update
it, due to compatibility issues that may arise with other applications that
depend on the package.
Also, there is one more file you can use `yum-cron-hourly.conf`
under `/etc/yum` directory for slicing yum works based on your need.

Here, We take an example of 2 packages -- mysql and php.
Here, We take an example of 2 packages to exclude: mysql and php.

Edit the `yum-cron.conf` file and `yum-cron-hourly.conf` under `/etc/yum` directory.
Exammple settings in `yum-cron.conf`:
Edit the `yum-cron.conf` file.

$ vi /etc/yum/yum-cron.conf

Expand All @@ -226,8 +228,8 @@ RHEL 7 and CentOS 7 Rackspace public cloud servers:
[base]
exclude = mysql* php*

Do it similarly in `yum-cron-hourly.conf` file also.
And then restart the yum-cron service.
Do it similarly in `yum-cron-hourly.conf` file also if you are using.
And then restart the yum-cron service after finishing the edit on both files.

$ systemctl start yum-cron

0 comments on commit d4b0ba5

Please sign in to comment.