In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "the method of compiling and installing the CentOS kernel". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Brief introduction of Linux Kernel
Now let's take a look at the architecture of the GNU/Linux operating system from a higher perspective. You can consider the operating system at two levels, as shown in the following figure
At the top is the user (or application) space. This is where the user application executes. Below user space is the kernel space, where the Linux kernel is located.
GNU C Library (glibc) is also here. It provides a system call interface to connect to the kernel and a mechanism to convert between user-space applications and the kernel. This is important because kernel and user-space applications use different protected address spaces. Each user-space process uses its own virtual address space, while the kernel occupies a separate address space.
The Linux kernel can be further divided into three layers. At the top is the system call interface, which implements some basic functions such as read and write. Beneath the system call interface is the kernel code, which can be more precisely defined as architecture-independent kernel code. This code is common to all processor architectures supported by Linux. Beneath this code is architecture-dependent code that forms a part commonly referred to as BSP (Board Support Package). This code is used as a processor for a given architecture and platform-specific code.
The Linux kernel implements many important architectural attributes. At a high or low level, the kernel is divided into multiple subsystems. Linux can also be seen as a whole because it integrates all these basic services into the kernel. This is different from the architecture of the microkernel, which provides basic services such as communication, Icano, memory, and process management, and more specific services are plugged into the microkernel layer.
Kernel compilation of CentOS system and
Download the kernel
Download the kernel from the official website https://www.kernel.org/. I downloaded linux-3.13.7.tar.xz.
The code is as follows:
Cat / proc/version # check my kernel version first
The code is as follows:
Cd / usr/src
Wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.7.tar.xz
Xz-d linux-*.tar.xz
Tar xf linux-*.tar
Cd linux-3.13.7
# clear source tree and .config
Make mrproper
You may report an error at this time, and you will be prompted as follows
* Unable to find the ncurses libraries or the
# workaround installation
# centos
Yum install ncurses-devel-y
# ubuntu
Apt-get install ncurses-dev
Custom kernel
The code is as follows:
Make menuconfig # should at least select the network card, file system and sound card driver. For configuration instructions, see the appendix at the bottom.
# 2.6 the previous version is, but now the kernel does not need make dep
Make dep
Make bzlmage
Make modules
Make modules_install
Make install
# compiling the kernel
Make
When make bzImage # compiles the kernel image, you will be prompted as follows
# Kernel: arch/x86/boot/bzImage is ready
Make modules # compiling kernel module
Make modules_install # install kernel module
# my 3.13.7 doesn't need too complicated configuration
Make install # is installed directly, including kernel mapping, grub configuration does not need to be manually configured, it is automatically configured for you by script
Let's see, what does the install.sh script do when I execute make install?
Now we can see that the previous tedious steps have been omitted and all the scripts have been dry. In fact, the script does the following for us.
Installation completed
This is the end of the compilation and installation of the CentOS kernel. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.