Installing kernel source code in RedHat or centos, kernel headers install

Source: Internet
Author: User

Install kernel source code: Installing kernel source code in RedHat or centos, kernel headers install

Both centos and rhel5 between des following packages:

Kernel-headers: It hosts des the C header files that specify the interface between the Linux kernel and userspace libraries and programs. the header files define structures and constants that are needed for building most standard programs and are also needed for rebuilding the glibc package.

Kernel-devel: This package provides kernel headers and makefiles sufficient to build modules against the kernel package.

C) actual kernel source code: You can always download actual source code here. Look for Kernel *. RPM file.

RHEL/centos 5 install kernel Headers

Use Yum command as follows:
# Yum install kernel-devel kernel-headers

Install kernel source code

Type the command as follows:
# Cd/tmp
# Wget ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/ OS /SRPMS/kernel-2.6.18-8.1.8.el5.src.rpm
# Rpm-IVH kernel-2.6.18-8.1.8.el5.src.rpm

Note change version number as per your current kernel.

For recompiling or adding a new module or device driver you just need kernel-devel and kernel-headers packages. to rebuilt kernel RPM goto/usr/src/RedHat/specs directory, modify kernel spec file and use rpmbuild command to rebuild RHEL/centos kernel rpm.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.