Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Network > General > Issue <<  202 of 208 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 13006
Last update: 07-02-08
Issue:
How to install the kernel source in Red Hat Enterprise Linux 5?
Resolution:
  1. Download source rpm for your kernel from RHN- kernel-2.6.18-8.1.8.el5.src.rpm

    To download the desired kernel source package. Go to rhn.redhat.com --> search for kernel package with search tool --> click on the kernel version --> and select the appropriate kernel-xxxx-src.rpm, and click on 'Download Source Package'.

  2. After successful download install the package
    $ rpm -ivh kernel-2.6.18-8.1.8.el5.src.rpm
    
  3. Install the dependencies
    $ yum install unifdef
    $ yum install redhat-rpm-config
    
  4. Go to directory the /usr/src/redhat/SPECS directory
    $ cd /usr/src/redhat/SPECS
    
  5. Build with rpmbuild
    $ rpmbuild -bp --target=x86_64 kernel-2.6.spec
    

    Note:- If dependency errors appear, then install those dependencies with yum ($ yum install )

  6. Copy and link the source file
    $ cp -a /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/ /usr/src/
    
    $ ln -s /usr/src/linux-2.6.18.x86_64/ /usr/src/linux
    

    Once completed, a symlinked directory pointing to the latest Linux 2.6 kernel source should be available:

    # ls -lt /usr/src/
    lrwxrwxrwx 1 root root 29 Oct 5 19:27 linux ->
    /usr/src/linux-2.6.18.x86_64/
    drwxr-xr-x 20 root root 4096 Oct 5 19:25 linux-2.6.18.x86_64
    


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Network > General > Issue <<   202  of  208  >>