How to Install Grsecurity in linux
First download the kernel using the below link:
http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.32/linux-2.6.32.51.tar.gz
Then, download gr-security path using the below link:
http://grsecurity.net/stable/grsecurity-2.2.2-2.6.32.51-201201021326.patch
Extract the kernel using the below command:
tar xjf linux-2.6.24.5.tar.gz
Then go to the extracted folder.
cd linux-2.6.32.51
Patch the kernel using below command.
patch -p1 < ../grsecurity-2.1.11-2.6.24.5-200804211829.patch
Use the below step to start making the kernel.
make clean && make mrproper
Once done the copy the previous kernel.
cp /boot/config-`uname -r` .config
Edit the kernel as per your requirement.
make menuconfig
Compile the kernel using the below command.
make bzImage
make modules
make modules_install
Run the below command to make sure it is working ok.
depmod 2.6.32.51-grsec
First check the architecture of your system using below command
arch
Installing and booting the kernel using the below steps:
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.32.51-grsec
Copy system.map to /boot directory
cp System.map /boot
Then edit the grub.conf file and select the gr-security kernel. Once done go to grub prompt and fire the below command to start the server once using that kernel. If it is not starting than it will start the server using previous kernel.
grub > savedefault –default=0 –once
Then reboot the server.
Shutdown -r now