LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to: Compile Kernel RHEL 5.3 (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-compile-kernel-rhel-5-3-a-718106/)

HazByn 04-09-2009 09:46 PM

How to: Compile Kernel RHEL 5.3
 
hi guys,

sorry about this thread but i can't find the one i really need.I'm a student and really new to linux @ RHEL.I've been asked to compile a kernel in RHEL.My colleagues been asked to compile a kernel in Ubuntu and it seems so easy.Below are the questions.

1. Where can i download the kernel for RHEL 5.3?
2. Do i need to update / upgrade anything before compiling and how?
3. How to compile a kernel in RHEL 5.3?

Here the information needed.

[root@localhost ~]# uname -srv
Linux 2.6.18-126.el5 #1 SMP Mon Dec 8 18:33:05 EST 2008

all help will be appreciate.Hopefully this thread will be a good thread for those who want to compile a kernel.TIA.

unSpawn 04-10-2009 02:34 AM

If you look at the bottom of the page you'll see the "Similar Threads" section. It lists thread titles with words in common. Since this has been asked before you might find leads or answers there or else by searching LQ. And since you already got your question going at http://www.linuxquestions.org/questi...5/#post3477912 I suggest this thread to be closed or merged. BTW, what you did there is called thread hijacking and is not appreciated by the OP and the LQ community. Do not do that again: create your own thread instead.

SkyEye 04-10-2009 02:46 AM

Hi and welcome to LQ!

I'm afraid this question has been answered many times before. Check the "similar threads" section in this page. But I'll just point you to the right direction. Here are the answers to your questions.

1. You can update your kernel from the RHEL yum repositories. This is possible only if you have a valid RHEL subscription. The good news is you can get the source RPM from the Red Hat FTP servers and build it manually. You can get the RHEL 5 series specific packages from this location on the FTP server. You'll need to know how to build source RPMs. It's easy, just search LQ or google it.

Alternatively you can use CentOS repositories to get new kernels because CentOS is essentially RHEL - Red Hat logos. But only do this if you know what you are doing.

2. This depends on what you currently have and what kernel version you plan to have. If you plan to build a custom kernel (see the answer to Q3) you'll need some packages, which you'll have to install manually if you don't have access to yum repositories.

Whatever you do remember one thing. It's best to build the kernel from the source package available from Red Hat. RH kernels are modified versions of the vanilla kernels available from the kernel.org. So if you are feeling adventurous, you can try to patch the vanilla kernel with the Red Hat patchset and then build it.

3. Building a new kernel should be straight forward. Check the answer to Q1.

However if you want to build a custom kernel (i.e.: if you want to build a kernel customized to your preferences) RH based systems provide a convenient set of tools for that. Use this guide as a reference. It's for CentOS, but you just need to use RH specific things instead of CentOS specific things. You can find more info on Red Hat docs.

EDIT: As usual the mods are working on it and unSpawn has already answered. I saw it only after I posted. :)

Nihlathak 04-13-2009 02:18 AM

thank a lot


All times are GMT -5. The time now is 09:01 PM.