Computer Geeks

Computer Geeks

Geek Shop

Geek News

Geek Stuff

Science Geek

Computer Gaming

Linux Chat

Building Websites

Computer Forums

Computer Help Forum

Computer Hardware Forum

Computer Software Programs


Go Back   Computer Forums > Building Websites
FAQ Community Calendar Today's Posts Search

Building Websites This section covers all aspects of publishing, developing and maintaining websites. Topics include: website design, graphic design, website programming, web hosting, website marketing (SEO, link exchange, publicity, advertising), monetization & etc.

Computer Geeks
» Active Discussions
Computer Geeks
No Threads to Display.
» Other Websites
- Software Publishing

- Server Hardening
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-25-2006, 12:13 AM
Soulwatcher's Avatar
Soulwatcher Soulwatcher is offline
Senior Member
GB GEEK
 
Join Date: Feb 2006
Posts: 309
Send a message via MSN to Soulwatcher
Default Compiling kernel 2.6.14.6 with grsec Centos 4.2

Warning use this guide at your own risk! It works on my server it doesn't mean it will work on yours.

you need gcc to compile kernel.
Code:
yum install gcc
ncurses-devel package is needed while compiling kernel
Code:
yum install ncurses-devel
I like to build my kernels in /usr/local/src
Code:
CD /usr/local/src
down Load kernel 2.6.14.6
Code:
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.14.6.tar.gz
untar the kernel
Code:
tar -zxf linux-2.6.14.6.tar.gz
download the grsecurity patch
Code:
wget http://grsecurity.net/grsecurity-2.1.8-2.6.14.6-200601211647.patch.gz
patch the kernel
Code:
gunzip < grsecurity-2.1.8-2.6.14.6-200601211647.patch.gz | patch -p0
cd to the kernel
Code:
cd linux-2.6.14.6
clean your kernel source configuration etc
Code:
make clean && make mrproper
use your current configuration to configure your new kernel
Code:
cp /boot/config-`uname -r` .config
go into into the menu
Code:
make menuconfig
go to the grsecsecurity option select medium

now to actually compile the kernel
Code:
make bzImage
Code:
make modules
Code:
make modules_install
make sure there are *NO* errors after this! If you do get errors the below is not going to work.

copy the new files into your /boot directory.
Code:
cp .config /boot/config-2.6.14.6-grsec
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.14.6-grsec
cp System.map /boot/System.map-2.6.14.6-grsec
mkinitrd /boot/initrd-2.6.14.6-grsec.img 2.6.14.6-grsec
using your favorite editor edit the grub config file.
Code:
/boot/grub/grub.conf
add the following line
Code:
title CentOS (2.6.14.6-grsec)
	root (hd0,0)
	kernel /vmlinuz-2.6.14.6-grsec ro root=LABEL=/
	initrd /initrd-2.6.14.6-grsec.img
Edit: make sure you check the root=LABEL=/ in grub as it may be different than mine. Make sure you use your servers own root=LABEL=/

thats it your done save and exit.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Powered by vBadvanced CMPS v3.2.3

All times are GMT -5. The time now is 10:15 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
HTML Help provided by HTML Help Central.