{"id":45460,"date":"2024-10-06T23:31:13","date_gmt":"2024-10-06T15:31:13","guid":{"rendered":"https:\/\/server.hk\/cnblog\/45460\/"},"modified":"2024-10-06T23:31:14","modified_gmt":"2024-10-06T15:31:14","slug":"%e5%9c%a8-centos-%e5%92%8c-ubuntu-16-04-%e4%b8%ad%e5%ae%89%e8%a3%9d-linux-kernel-4-12","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/45460\/","title":{"rendered":"\u5728 CentOS \u548c Ubuntu 16.04 \u4e2d\u5b89\u88dd Linux Kernel 4.12"},"content":{"rendered":"<h1 id=\"%e5%9c%a8-centos-%e5%92%8c-ubuntu-16-04-%e4%b8%ad%e5%ae%89%e8%a3%9d-linux-kernel-4-12-pOpDoOnjUL\">\u5728 CentOS \u548c Ubuntu 16.04 \u4e2d\u5b89\u88dd Linux Kernel 4.12<\/h1>\n<p>Linux Kernel \u662f\u64cd\u4f5c\u7cfb\u7d71\u7684\u6838\u5fc3\uff0c\u8ca0\u8cac\u7ba1\u7406\u786c\u9ad4\u8cc7\u6e90\u548c\u63d0\u4f9b\u7cfb\u7d71\u670d\u52d9\u3002\u96a8\u8457\u6280\u8853\u7684\u9032\u6b65\uff0c\u65b0\u7684\u5167\u6838\u7248\u672c\u4e0d\u65b7\u63a8\u51fa\uff0c\u5e36\u4f86\u4e86\u6027\u80fd\u63d0\u5347\u548c\u65b0\u529f\u80fd\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5728 CentOS \u548c Ubuntu 16.04 \u4e2d\u5b89\u88dd Linux Kernel 4.12\u3002<\/p>\n<h2 id=\"%e7%82%ba%e4%bb%80%e9%ba%bc%e9%81%b8%e6%93%87-linux-kernel-4-12%ef%bc%9f-pOpDoOnjUL\">\u70ba\u4ec0\u9ebc\u9078\u64c7 Linux Kernel 4.12\uff1f<\/h2>\n<p>Linux Kernel 4.12 \u65bc 2017 \u5e74 6 \u6708\u767c\u5e03\uff0c\u5305\u542b\u4e86\u591a\u9805\u6539\u9032\u548c\u65b0\u7279\u6027\uff0c\u4f8b\u5982\uff1a<\/p>\n<ul>\n<li>\u589e\u5f37\u7684\u786c\u9ad4\u652f\u6301\uff0c\u7279\u5225\u662f\u5c0d\u65b0\u578b\u986f\u793a\u5361\u548c\u8655\u7406\u5668\u7684\u652f\u6301\u3002<\/li>\n<li>\u6539\u9032\u7684\u6587\u4ef6\u7cfb\u7d71\u6027\u80fd\uff0c\u7279\u5225\u662f\u5c0d Btrfs \u548c EXT4 \u7684\u512a\u5316\u3002<\/li>\n<li>\u66f4\u597d\u7684\u865b\u64ec\u5316\u652f\u6301\uff0c\u63d0\u5347\u4e86 KVM \u548c Xen \u7684\u6027\u80fd\u3002<\/li>\n<li>\u5b89\u5168\u6027\u589e\u5f37\uff0c\u5305\u62ec\u5c0d Spectre \u548c Meltdown \u6f0f\u6d1e\u7684\u4fee\u88dc\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%9c%a8-centos-%e4%b8%ad%e5%ae%89%e8%a3%9d-linux-kernel-4-12-pOpDoOnjUL\">\u5728 CentOS \u4e2d\u5b89\u88dd Linux Kernel 4.12<\/h2>\n<p>\u4ee5\u4e0b\u662f\u5728 CentOS \u4e2d\u5b89\u88dd Linux Kernel 4.12 \u7684\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-1%ef%bc%9a%e6%9b%b4%e6%96%b0%e7%b3%bb%e7%b5%b1-pOpDoOnjUL\">\u6b65\u9a5f 1\uff1a\u66f4\u65b0\u7cfb\u7d71<\/h3>\n<pre><code>sudo yum update<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-2%ef%bc%9a%e5%ae%89%e8%a3%9d%e5%bf%85%e8%a6%81%e7%9a%84%e5%b7%a5%e5%85%b7-pOpDoOnjUL\">\u6b65\u9a5f 2\uff1a\u5b89\u88dd\u5fc5\u8981\u7684\u5de5\u5177<\/h3>\n<pre><code>sudo yum install -y wget gcc make<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-3%ef%bc%9a%e4%b8%8b%e8%bc%89-linux-kernel-4-12-pOpDoOnjUL\">\u6b65\u9a5f 3\uff1a\u4e0b\u8f09 Linux Kernel 4.12<\/h3>\n<pre><code>wget https:\/\/cdn.kernel.org\/pub\/linux\/kernel\/v4.x\/linux-4.12.tar.xz<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-4%ef%bc%9a%e8%a7%a3%e5%a3%93%e7%b8%ae%e4%b8%8b%e8%bc%89%e7%9a%84%e6%aa%94%e6%a1%88-pOpDoOnjUL\">\u6b65\u9a5f 4\uff1a\u89e3\u58d3\u7e2e\u4e0b\u8f09\u7684\u6a94\u6848<\/h3>\n<pre><code>tar -xvf linux-4.12.tar.xz<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-5%ef%bc%9a%e7%b7%a8%e8%ad%af%e5%92%8c%e5%ae%89%e8%a3%9d%e5%85%a7%e6%a0%b8-pOpDoOnjUL\">\u6b65\u9a5f 5\uff1a\u7de8\u8b6f\u548c\u5b89\u88dd\u5167\u6838<\/h3>\n<pre><code>cd linux-4.12\nmake menuconfig\nmake\nsudo make modules_install\nsudo make install<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-6%ef%bc%9a%e6%9b%b4%e6%96%b0%e5%bc%95%e5%b0%8e%e5%8a%a0%e8%bc%89%e5%99%a8-pOpDoOnjUL\">\u6b65\u9a5f 6\uff1a\u66f4\u65b0\u5f15\u5c0e\u52a0\u8f09\u5668<\/h3>\n<pre><code>sudo grub2-mkconfig -o \/boot\/grub2\/grub.cfg<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-7%ef%bc%9a%e9%87%8d%e5%95%9f%e7%b3%bb%e7%b5%b1-pOpDoOnjUL\">\u6b65\u9a5f 7\uff1a\u91cd\u555f\u7cfb\u7d71<\/h3>\n<pre><code>sudo reboot<\/code><\/pre>\n<p>\u91cd\u555f\u5f8c\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5\u5167\u6838\u7248\u672c\uff1a<\/p>\n<pre><code>uname -r<\/code><\/pre>\n<h2 id=\"%e5%9c%a8-ubuntu-16-04-%e4%b8%ad%e5%ae%89%e8%a3%9d-linux-kernel-4-12-pOpDoOnjUL\">\u5728 Ubuntu 16.04 \u4e2d\u5b89\u88dd Linux Kernel 4.12<\/h2>\n<p>\u5728 Ubuntu 16.04 \u4e2d\u5b89\u88dd Linux Kernel 4.12 \u7684\u6b65\u9a5f\u5982\u4e0b\uff1a<\/p>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-1%ef%bc%9a%e6%9b%b4%e6%96%b0%e7%b3%bb%e7%b5%b1-pOpDoOnjUL\">\u6b65\u9a5f 1\uff1a\u66f4\u65b0\u7cfb\u7d71<\/h3>\n<pre><code>sudo apt update &amp;&amp; sudo apt upgrade<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-2%ef%bc%9a%e5%ae%89%e8%a3%9d%e5%bf%85%e8%a6%81%e7%9a%84%e5%b7%a5%e5%85%b7-pOpDoOnjUL\">\u6b65\u9a5f 2\uff1a\u5b89\u88dd\u5fc5\u8981\u7684\u5de5\u5177<\/h3>\n<pre><code>sudo apt install -y build-essential libncurses-dev bison flex libssl-dev libelf-dev<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-3%ef%bc%9a%e4%b8%8b%e8%bc%89-linux-kernel-4-12-pOpDoOnjUL\">\u6b65\u9a5f 3\uff1a\u4e0b\u8f09 Linux Kernel 4.12<\/h3>\n<pre><code>wget https:\/\/cdn.kernel.org\/pub\/linux\/kernel\/v4.x\/linux-4.12.tar.xz<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-4%ef%bc%9a%e8%a7%a3%e5%a3%93%e7%b8%ae%e4%b8%8b%e8%bc%89%e7%9a%84%e6%aa%94%e6%a1%88-pOpDoOnjUL\">\u6b65\u9a5f 4\uff1a\u89e3\u58d3\u7e2e\u4e0b\u8f09\u7684\u6a94\u6848<\/h3>\n<pre><code>tar -xvf linux-4.12.tar.xz<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-5%ef%bc%9a%e7%b7%a8%e8%ad%af%e5%92%8c%e5%ae%89%e8%a3%9d%e5%85%a7%e6%a0%b8-pOpDoOnjUL\">\u6b65\u9a5f 5\uff1a\u7de8\u8b6f\u548c\u5b89\u88dd\u5167\u6838<\/h3>\n<pre><code>cd linux-4.12\nmake menuconfig\nmake\nsudo make modules_install\nsudo make install<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-6%ef%bc%9a%e6%9b%b4%e6%96%b0%e5%bc%95%e5%b0%8e%e5%8a%a0%e8%bc%89%e5%99%a8-pOpDoOnjUL\">\u6b65\u9a5f 6\uff1a\u66f4\u65b0\u5f15\u5c0e\u52a0\u8f09\u5668<\/h3>\n<pre><code>sudo update-grub<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-7%ef%bc%9a%e9%87%8d%e5%95%9f%e7%b3%bb%e7%b5%b1-pOpDoOnjUL\">\u6b65\u9a5f 7\uff1a\u91cd\u555f\u7cfb\u7d71<\/h3>\n<pre><code>sudo reboot<\/code><\/pre>\n<p>\u91cd\u555f\u5f8c\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5\u5167\u6838\u7248\u672c\uff1a<\/p>\n<pre><code>uname -r<\/code><\/pre>\n<h2 id=\"%e7%b8%bd%e7%b5%90-pOpDoOnjUL\">\u7e3d\u7d50<\/h2>\n<p>\u5b89\u88dd Linux Kernel 4.12 \u5728 CentOS \u548c Ubuntu 16.04 \u4e2d\u7684\u904e\u7a0b\u76f8\u5c0d\u7c21\u55ae\uff0c\u901a\u904e\u4e0a\u8ff0\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u8f15\u9b06\u5347\u7d1a\u5230\u6700\u65b0\u7684\u5167\u6838\u7248\u672c\uff0c\u4eab\u53d7\u66f4\u597d\u7684\u6027\u80fd\u548c\u5b89\u5168\u6027\u3002\u5982\u679c\u60a8\u9700\u8981\u7a69\u5b9a\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u9069\u5408\u4e0d\u540c\u9700\u6c42\u7684\u7528\u6236\u3002\u7121\u8ad6\u662f <a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a> \u9084\u662f\u5176\u4ed6\u5730\u5340\u7684\u670d\u52d9\uff0c\u6211\u5011\u90fd\u80fd\u6eff\u8db3\u60a8\u7684\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b78\u7fd2\u5982\u4f55\u5728 CentOS \u548c Ubuntu 16.04 \u4e0a\u5b89\u88dd Linux Kernel 4.12\uff0c\u63d0\u5347\u7cfb\u7d71\u6027\u80fd\u8207\u7a69\u5b9a\u6027\uff0c\u7c21\u55ae\u6b65\u9a5f\u8f15\u9b06\u5b8c\u6210\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-45460","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/45460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=45460"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/45460\/revisions"}],"predecessor-version":[{"id":45461,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/45460\/revisions\/45461"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=45460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=45460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=45460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}