Operating System - Linux
1752591 Members
3175 Online
108788 Solutions
New Discussion юеВ

Re: Kernel compiling in red hat Linux

 
Waqar Razi
Regular Advisor

Kernel compiling in red hat Linux

I am an HP Unix administrator and new to Red Hat Linux. Can some one please give me steps to compile kernel in red hat Linux 5 lets say if you want to change some kernel parameters and recompile the kernel.

Detailed steps are highly appreciated and I will give 10 points for that.

6 REPLIES 6
Ivan Krastev
Honored Contributor

Re: Kernel compiling in red hat Linux

avizen9
Esteemed Contributor

Re: Kernel compiling in red hat Linux

Ivan Ferreira
Honored Contributor

Re: Kernel compiling in red hat Linux

>>> if you want to change some kernel parameters and recompile the kernel.

Kernel parameters are changed on the fly by using the /proc subsystem.

You can check all kernel parameters with:

sysctl -a

You then can change them with:

sysctl -w

You can make the changes permanent editing /etc/sysctl.conf.

You can apply the changes to /etc/sysctl.conf using:

sysctl -p

And to compile the kernel, use the above links.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Vitaly Karasik_1
Honored Contributor

Re: Kernel compiling in red hat Linux

You don't need to re-compile linux kernel in order to change kernel parameters.
There is "sysctl" interface for tuning kernel params on-the-fly, see for example this article

http://www.linux.com/feature/146599
Asif Sharif
Honored Contributor

Re: Kernel compiling in red hat Linux

dirk dierickx
Honored Contributor

Re: Kernel compiling in red hat Linux

normally you do _not_ need to recompile the kernel. if changing params just use sysctl (check the man page for all possible info).

recompiling the kernel on linux is only needed if you are changing the source code.

also note that RH will only support their supplied pre-compiled kernels. so when you go round using your own you are out of support.

second note, if a new kernel is available containing bug fixes & security fixes you will need to compile your kernel again from the new source and apply your patches yourself.