How To Install kpatch-build.x86_64 on Amazon Linux 2

In this tutorial we learn how to install kpatch-build.x86_64 in Amazon Linux 2. kpatch-build.x86_64 is Dynamic kernel patching

Introduction

In this tutorial we learn how to install kpatch-build.x86_64 on Amazon Linux 2.

What is kpatch-build.x86_64

kpatch is a Linux dynamic kernel patching tool which allows you to patch a running kernel without rebooting or restarting any processes. It enables sysadmins to apply critical security patches to the kernel immediately, without having to wait for long-running tasks to complete, users to log off, or for scheduled reboot windows. It gives more control over up-time without sacrificing security or stability.

We can use yum to install kpatch-build.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install kpatch-build.x86_64.

Install kpatch-build.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install kpatch-build.x86_64 using yum by running the following command:

sudo yum -y install kpatch-build.x86_64

How To Uninstall kpatch-build.x86_64 on Amazon Linux 2

To uninstall only the kpatch-build.x86_64 package we can use the following command:

sudo yum remove kpatch-build.x86_64

kpatch-build.x86_64 Package Contents on Amazon Linux 2

/usr/bin/kpatch-build
/usr/libexec/kpatch
/usr/libexec/kpatch/create-diff-object
/usr/libexec/kpatch/create-klp-module
/usr/libexec/kpatch/create-kpatch-module
/usr/libexec/kpatch/kpatch-cc
/usr/share/kpatch
/usr/share/kpatch/patch
/usr/share/kpatch/patch/Makefile
/usr/share/kpatch/patch/kpatch-macros.h
/usr/share/kpatch/patch/kpatch-macros.h.orig
/usr/share/kpatch/patch/kpatch-patch-hook.c
/usr/share/kpatch/patch/kpatch-patch.h
/usr/share/kpatch/patch/kpatch.h
/usr/share/kpatch/patch/kpatch.lds.S
/usr/share/kpatch/patch/livepatch-patch-hook.c
/usr/share/kpatch/patch/patch-hook.c
/usr/share/man/man1/kpatch-build.1.gz

References

Summary

In this tutorial we learn how to install kpatch-build.x86_64 on Amazon Linux 2 using yum.