top of page

Oracle Linux Basic Administration Series - Part 15 - How to Update and Patch Oracle Linux Safely

  • Jason Beattie
  • 19 hours ago
  • 2 min read

Keeping your Oracle Linux system up to date is essential for security, stability, and performance.


Regular updates fix vulnerabilities, improve compatibility, and ensure your server runs smoothly.



In this blog, you’ll learn how to:

  • Check for and install updates using dnf

  • Manage kernel updates

  • Use Ksplice for live patching (no reboot updates)

  • Automate and verify system updates safely


Step 1: Check for Available Updates


First, always check what updates are available before applying them.

sudo dnf check-update

This command lists all packages with newer versions in your repositories.

Example output:


ree


Step 2: Update All Packages

To update the entire system safely:

sudo dnf update -y
ree

After completion, it’s a good idea to reboot if the kernel or core libraries were updated:

sudo reboot

You can simulate an update without actually performing it:

sudo dnf update --assumeno

This shows what will be updated


Step 3: Update a Specific Package


If you want to update just one package (e.g., Apache):

sudo dnf update httpd -y

To install a specific version:

sudo dnf install httpd-2.4.57-1.el9 -y

Step 4: Check Kernel Versions and Manage Boot Entries


List installed kernels:

rpm -q kernel

View the currently running kernel:

uname -r
ree

After a kernel update, you can reboot into the new version automatically.If you ever need to revert to an older one:


  1. Reboot the system.

  2. At the GRUB menu, choose the previous kernel version.


Step 5: Use Ksplice for Live Patching (No Reboot Needed)


Oracle’s Ksplice technology allows you to apply important security and kernel updates without rebooting your system.


Install Ksplice Uptrack client:

sudo dnf install -y uptrack

Register it with your Oracle account (or ULN subscription):

sudo uptrack-upgrade -y

ree

List installed patches:

sudo uptrack-show
ree

Ksplice is ideal for production servers where uptime is critical.


Step 6: Automate Updates with cron or systemd


To automatically check and install updates, install:

sudo dnf install -y dnf-automatic

Edit configuration:

sudo vim /etc/dnf/automatic.conf

Set:

apply_updates = yes

Enable automatic updates:

sudo systemctl enable --now dnf-automatic.timer

Step 7: Review Update History


You can see what’s been updated recently:

sudo dnf history
ree

To view details of a specific transaction:

sudo dnf history info <ID>

To undo an update (rollback):

sudo dnf history undo <ID>

Example:

sudo dnf history undo 10 -y

Step 8: Clean Up Old Packages and Cache

After updates, you can free space by removing outdated packages:

sudo dnf autoremove -y

Clean up cached metadata:

sudo dnf clean all
ree

Step 9: Enable and Manage Oracle Repositories


Check enabled repositories:

sudo dnf repolist

ree

Enable or disable repositories:

sudo dnf config-manager --enable ol8_appstream
sudo dnf config-manager --disable ol8_developer

List available ones:

sudo dnf repolist all
ree

Step 10: Verify System Integrity After Updates


After major updates or patches, verify that all key services are running correctly:

sudo systemctl status sshd
sudo systemctl status firewalld
sudo systemctl status httpd

Recheck kernel version:

uname -r

Check system logs for post-update errors:

sudo journalctl -p err -b
ree

Conclusion


You’ve learned how to safely update and patch Oracle Linux using both dnf and Ksplice. With regular updates and smart automation, your systems stay secure and reliable with minimal downtime.


This concludes the Oracle Linux Basic Administration Series a complete foundation for anyone starting their journey in Oracle Linux system administration.

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
Post: Blog2 Post
  • LinkedIn

©2023 Proudly created with Wix.com

bottom of page