How to Block Package and Kernel Updates in CentOS / Rocky Linux

 

 

Introduction

Blocking package and kernel updates in CentOS or Rocky Linux can be crucial for maintaining system stability, especially in production environments. This guide will show you how to effectively block updates, ensuring your server remains consistent and reliable. This method can be particularly beneficial when hosting on a Windows VPS UK.

Prerequisites

  • A CentOS or Rocky Linux server with root access
  • Basic knowledge of Linux commands

Step 1: Update Your System

Before proceeding, ensure your system is up to date:

sudo dnf update -y

Step 2: Block Kernel Updates

To prevent kernel updates, create a configuration file for DNF to exclude kernel packages:

sudo nano /etc/dnf/dnf.conf

Add the following line to the configuration file:

exclude=kernel*

This will block any updates related to the kernel package.

Step 3: Block Specific Package Updates

If you wish to block specific packages, you can do so by adding them to the exclude line in the same configuration file. For example:

exclude=kernel* httpd php

This line will block updates for both the kernel and the Apache HTTP server (httpd) as well as PHP.

Step 4: Verify the Configuration

To ensure that your configuration is correct, you can run the following command to check for available updates:

sudo dnf check-update

You should see that the blocked packages are not listed for updates.

Step 5: Using a Virtual Server

When managing a Windows VPS or any virtual private server hosting Windows, it’s crucial to implement this method to prevent unexpected downtime caused by unwanted updates.

Step 6: Conclusion

You have successfully configured your CentOS or Rocky Linux server to block package and kernel updates. This setup helps maintain system stability, especially in production environments. By using this method on a Windows VPS, you can ensure a reliable hosting experience. For additional options, explore various VPS UK Windows solutions, including Windows Virtual Private Server Hosting and Windows VPS Hosting UK for optimal server performance.

© 2024 Blocking Updates Tutorial. All rights reserved.

  • 0 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

Boost Your Ubuntu System's Performance with a Swap File: A Step-by-Step Guide

What is a Swap File? A swap file in Ubuntu serves as dedicated virtual memory on your hard...

How to Migrate ISPConfig 2, ISPConfig 3.x, Confixx, CPanel or Plesk to ISPConfig 3.2 (single server)

Introduction Migration from other control panels like ISPConfig 2, ISPConfig 3.x, Confixx,...

How to Install and Configure Zabbix Server and Client on Rocky Linux 9

Introduction Zabbix is an open-source monitoring solution that provides real-time...

How to Install CockroachDB Cluster on Debian 12

Introduction CockroachDB is a distributed SQL database built to handle large-scale,...

How to Install Joomla with Apache and Let's Encrypt SSL on AlmaLinux 9

Introduction Joomla is a popular open-source content management system (CMS) used to build...