In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to upgrade the Linux kernel tutorial, the content is concise and easy to understand, can definitely brighten your eyes, through the detailed introduction of this article, I hope you can get something.
Hello, everyone. Today we will learn how to install the latest Linux kernel 4.0 from Elrepo or source code. Linux kernel 4. 0 codenamed 'Hurr durr I'm a sheep'' is the latest backbone kernel so far. It is a kernel released after stable version 3.19.4. On April 12th, a big day for all open source enthusiasts, Linux Torvalds announced the release of Linux kernel 4. 0, which is now available. It was expected to be an important version because it included some great features, such as no restart patches (real-time patches), new upgrade drivers, the latest hardware support, and many interesting features. In fact, however, kernel 4. 0 is not considered as an important version as expected, and Linus says it expects 4. 1 to be a more important version. Real-time patches have been integrated into the SUSE Enterprise Linux operating system. You can see more details about this release in the announcement.
Warning: installing a new kernel may make your system unavailable or unstable. If you still use the following command to continue with the installation, be sure to back up all important data to the external hard drive.
Install Linux kernel 4.0 on Ubuntu 15.04
If you are using Ubuntu 15.04, the Linux distribution, you can install it directly from the Ubuntu kernel website. To install the latest Linux kernel 4.0 on your Ubuntu15.04, you need to run the following command under root access in shell or terminal.
In 64-bit Ubuntu 15.04
The code is as follows:
$wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-image-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb
$wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb
$sudo dpkg-I linux-headers-4.0.0*.deb linux-image-4.0.0*.deb
At 32-bit Ubuntu 15.04,
The code is as follows:
$wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-image-4.0.0-040000-generic_4.0.0-040000.201504121935_i386.deb
$wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_i386.deb
$sudo dpkg-I linux-headers-4.0.0*.deb linux-image-4.0.0*.deb
Install Linux Kernel 4.0 on CentOS 7
We can install Linux kernel 4.0 on CentOS 7 in two simple ways.
Install from Elrepo software repository
Compile and install from source code
Let's first install using ElRepo, which is the easiest way to do this:
Install using Elrepo
1. Download and install ELRepo
We first download the GPG key for ELRepo and install the relrepo-release installation package. Because we are using CentOS 7, we use the following command to install elrepo-release-7.0-2.el7.elrepo.noarch.rpm.
Note: if you have enabled secure boot, please check this page for more information.
The code is as follows:
# rpm-- import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
# rpm-Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
two。 Upgrade the Linux kernel to version 4.0
We are now ready to install the latest stable version of kernel 4.0 from the ELRepo software repository. To install it, we need to enter the following command in the shell or terminal of CentOS 7.
The code is as follows:
# yum-enablerepo=elrepo-kernel install kernel-ml
The above command automatically installs Linux kernel 4. 0 built for CentOS 7.
Now, here is another way to install the latest kernel 4.0 by compiling the source code.
Compile and install from source code
1. Install dependent softwar
First we need to install the dependent software for compiling the linux kernel. To do this, we need to run the following command in a terminal or shell.
The code is as follows:
# yum groupinstall "Development Tools"
# yum install gcc ncurses ncurses-devel
Then we will upgrade our entire system.
The code is as follows:
# yum update
two。 Download the source code
Now let's download the source code for the newly released Linux kernel 4.0 from the official repository of the linux kernel through the wget command. You can also use your browser to download the kernel directly from the kernel.org website.
The code is as follows:
# cd / tmp/
# wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.0.tar.xz
3. Decompress the tar package
After the file has been downloaded, we unzip it under the / usr/src/ folder with the following command.
# tar-xf linux-4.0.tar.xz-C / usr/src/
# cd / usr/src/linux-4.0/
4. Configuration
There are two options for configuring the Linux kernel. We can create a new custom configuration file or use an existing configuration file to build and install the Linux kernel. It all depends on your own needs.
Configure a new kernel
Now let's run the make menuconfig command in shell or terminal to configure the Linux kernel. After we execute the following command, we will display a pop-up window containing all the menus. Here we can choose our new kernel configuration. If you are not familiar with these menus, press the ESC key twice to exit.
The code is as follows:
# make menuconfig
Existing configuration
If you want to configure your latest kernel with an existing configuration file, enter the following command. If you have any adjustments to the configuration, you can choose Y or N, or just press enter to continue.
The code is as follows:
# make oldconfig
5. Compile the Linux kernel
Next, we will execute the make command to compile kernel 4.0. Depending on your system configuration, compilation takes at least 20-30 minutes.
Note: if a bc command not found error occurs while compiling the kernel, you can use the yum install bc command to install bc to fix this error.
The code is as follows:
# make
6. Install Linux kernel 4. 0
After the compilation, we are finally going to install the kernel on your Linux system. The following command creates a file in the / boot directory and creates a new kernel entry in the Grub menu.
The code is as follows:
# make modules_install install
7. Verify the kernel
After installing the latest kernel 4.0, we hope to be able to verify it. To do this, we just need to type the following command into the terminal. If all goes well, we will see the kernel version, such as 4.0, appear in the output list.
The code is as follows:
# uname-r
Well, we have successfully installed the latest Linux kernel version 4.0 on our CentOS 7 operating system. There is usually no need to upgrade the linux kernel because hardware that works well with previous versions may not be suitable for the new version. We want to make sure it includes features and accessories that make your hardware work properly. But in most cases, the new stable version of the kernel will improve your hardware performance.
The above is what the tutorial for upgrading the Linux kernel is like. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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
Display startupMainBoard: Startup system software: sd1:/ar2240s-v200r003c01spc900
© 2024 shulou.com SLNews company. All rights reserved.