dufault.info

Ramblings of a phone weenie, Linux sysadmin, and other things geeky

Installing a grsec-patched kernel on a CentOS 5 or RHEL 5 server

Here’s my little guide for upgrading a CentOS server to a grsec-patched kernel. At the time of this writing, this was the latest stable grsec patch available.
Fetch the sources:
wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.5.tar.bz2
wget http://grsec.linux-kernel.at/grsecurity-2.1.11-2.6.24.5-200804211829.patch.gz
Extract:
tar xjf linux-2.6.24.5.tar.gz
gzip -d grsecurity-2.1.11-2.6.24.5-200804211829.patch.gz
Patch the kernel:
patch -p0 < grsecurity-2.1.11-2.6.24.5-200804211829.patch
cd linux-2.6.24.5 && make clean && make mrproper
Copy the previous kernel config to use:
cp [...]