Basic Linux knowledge: Kernel compilation-Compilation Method

Source: Internet
Author: User
Basic Linux knowledge: Kernel compilation-compiling method-general Linux technology-Linux programming and kernel information. For details, see the following. 1. Why should we compile the kernel;

Sometimes we need Kernel support for some features, such as iptables firewalls, and hardware support. At this time, we need to re-compile the kernel;

   2. Selection of the kernel source code version;

If the release version provides the kernel source code, it is best to use the release version. For example, Fedora 4.0 provides many versions of the kernel source code. After installation, the built-in configuration file can meet our needs. For Beginners, the configuration file is based on the built-in kernel. config, we can also learn how to configure the kernel. There is no difficulty, and practice makes perfect;

You can also download the latest stable kernel version from kernel.org;

   3. install or decompress the kernel source code;

For Fedora Core 4.0, the kernel source code is stored in the/usr/src/kernels directory. If the kernel is upgraded online, it is also stored in this directory; if no content exists in/usr/src/kernels/in your system, the kernel source code package kernel-devel is not installed;

You can use the Package Manager to complete the installation. See Fedora/Redhat package management guide.

If you use Fedora Core 4.0, we recommend that you download the latest kernel kerenl-devel and the corresponding kernel version online or from kernel.org on the basis of keeping the old kernel, sometimes the new kerenl may have solved your problems, so there is no need to compile the kernel;

If you install the kernel source code package online, such as through apt + synaptic or yum, the kernel source code will be placed in the directory under/usr/src/kernel, you need to enter the corresponding directory for compilation;

For online update software packages, see Fedora/Redhat software package management guide. apt + synaptic tools are recommended;

If you are downloading the rpm package of kernel and kernel-devel, you can install it through;

Code:
CODE: [root @ localhost beinan] # rpm-ivh kernel *. rpm

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.