Leave Your Message
*Name Cannot be empty!
* Enter product details such as size, color,materials etc. and other specific requirements to receive an accurate quote. Cannot be empty
Tonoa he Whakatau
E toru ngā huarahi hei whakapai ake i te kernel o te pūnaha CentOS rorohiko ahumahi
Blog

E toru ngā huarahi hei whakapai ake i te kernel o te pūnaha CentOS rorohiko ahumahi

2024-10-17 15:08:44

I te wā e whakamahia ana a CentOS, he mea tika kia whakahoutia te kernel, engari i ētahi wā nā ngā take whakawhirinaki ki te whakahiato waehere pūtake, kāore ngā papatono katoa e tautoko i te putanga kernel hou, nō reira ka whakaatuhia e whai ake nei ngā huarahi e toru hei whakahou i te kernel.

Tuhipoka:
Mō ngā momo kernel:
Ko te ml i roto i te kernel-ml te whakarāpopototanga o [mainline stable] i te reo Ingarihi, ā, ko te putanga mainline hou kua whakarārangihia ki elrepo-kernel.
Ko te lt i roto i te kernel-lt te whakarāpopototanga o [long term support] i te reo Ingarihi, ā, kei roto i te elrepo-kernel te putanga tautoko roa.
Tirohia te putanga kernel
ingoakore -r

Whakaahua 1
Rārangi Kaupapa

1. tāutanga yum

1. Kawemai i te pūtake putunga
rpm --kawemai https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
2. Tirohia ngā mōkihi ka taea te tāuta
yum --enablerepo="elrepo-kernel" rārangi --whakaatutārua | kōmaka -r | grep
kernel-ml.x86_64
3. Tīpakohia te putanga ML, LT rānei hei tāuta
Ki te kore he putanga i tohua, ka tāutahia te putanga hou mā te taunoa
Tāutahia te putanga ML
yum --enablerepo=elrepo-kernel tāuta kernel-ml-devel kernel-ml -y
Tāutahia te putanga LT, tīpakohia tēnei mō ngā K8S katoa
yum --enablerepo=elrepo-kernel tāuta kernel-lt-devel kernel-lt -y
4. Tirohia te raupapa whakaara kernel o nāianei
awk -F\' '$1=="taurangi " {tā $2}' /etc/grub2.cfg
5. Whakarerekētia te tūemi whakaara taunoa
Ko te xxx te tau rangatū, e tohu ana i te tūemi x i roto i te rārangi whakaara hei tūemi whakaara, ā, ka tīmata te tatau a x mai i te 0.
tautuhinga-grub2-tautuhinga-taunoa xxxx
Hei tauira, ki te hiahia koe ki te whakarite kia tīmata mā te kernel 4.4
kātahi ka pato tika i te "grub2-set-default 0", ā, ka taea e koe te tīmata mai i te 4.4 i te wā e tīmata ai koe.
Tirohia te raupapa whakaara kernel
[pūtake@localhost ~] awk -F\' '$1=="taurangi " {tā $2}' /etc/grub2.cfg
CentOS Linux (4.4.179-1.el7.elrepo.x86_64) 7 (Matua)
CentOS Linux (3.10.0-693.el7.x86_64) 7 (Matua)
CentOS Linux (0-rescue-6d4c599606814867814f1a8eec7bfd1e) 7 (Matua)
Tautuhia te tau raupapatanga whakaara
[pūtake@localhost ~] grub2-tautuhi-taunoa 0
Tīmata anō
whakaara anō
Tirohia te putanga kernel
ingoakore -r

Whakaahua 2

2. Tāutanga RPM

Tirohia te putanga kernel
ingoakore -r
1. Kimihia te putanga
Nā te mea ko te pūtake ELRepo te putanga hou, ka taea anake te tango ā-ringa i te putanga tawhito o te kernel.
Kimihia te putanga tawhito o te rpm kernel:
http://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/
2. Me tango e koe ngā momo rpm e toru
wget
http://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/kernel-lt
devel-4.4.215-1.el7.elrepo.x86_64.rpm
wget
http://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/kernel-lt
pane-4.4.215-1.el7.elrepo.x86_64.rpm
wget
http://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/kernel-lt-
4.4.215-1.el7.elrepo.x86_64.rpm
3. Tāutahia te kernel
rpm -ivh kernel-lt-4.4.215-1.el7.elrepo.x86_64.rpm
rpm -ivh kernel-lt-devel-4.4.215-1.el7.elrepo.x86_64.rpm
rānei
#Tāutahia katoa i te pāwhiri kotahi
rpm -Uvh *.rpm
4. Whakaūtia te putanga kernel kua tāutahia
[pakiaka@localhost ~]# rpm -qa | grep kernel
ngā pane-keru-3.10.0-1160.15.2.el7.x86_64
kernel-devel-3.10.0-1160.49.1.el7.x86_64
ngā taputapu-kernel-libs-3.10.0-957.el7.x86_64
kernel-3.10.0-957.el7.x86_64
kernel-ml-4.9.9-1.el7.elrepo.x86_64
kernel-lt-4.4.215-1.el7.elrepo.x86_64
ngā taputapu-kernel-3.10.0-957.el7.x86_64
kernel-lt-devel-4.4.215-1.el7.elrepo.x86_64

5. Tautuhi i te tīmatanga
Tirohia te raupapa tīmatanga
[pūtake@localhost ~]# awk -F\' '$1=="taurangi " {tā $2}' /etc/grub2.cfg
CentOS Linux (4.4.215-1.el7.elrepo.x86_64) 7 (Matua)
CentOS Linux (4.9.9-1.el7.elrepo.x86_64) 7 (Matua)
CentOS Linux (3.10.0-957.el7.x86_64) 7 (Matua)
CentOS Linux (0-rescue-b91f945269084aa98e8257311ee713c5) 7 (Matua)
Whakatakotoria te raupapa whakaara
[pakiaka@localhost ~]# grub2-tautuhi-taunoa 0
Tīmata anō kia whai mana
[pakiaka@localhost ~]# whakaara anō

3. Tāutanga waehere pūtake

1. Tāutahia te kete pūmanawa matua
yum tāuta -y gcc hanga git ctags ncurses-devel openssl-devel
yum tāuta -y bison flex elfutils-libelf-devel bc
2. Waihangahia he kōpaki whakahiato kernel
Whakamahia te kōpaki kernelbuild i raro i te kāinga
mkdir ~/hanga kernel
3. Tikina te waehere pūtake o te kernel
Pae whakaata o Te Whare Wānanga o Tsinghua:
https://mirror.tuna.tsinghua.edu.cn/kernel/v4.x/?C=M&O=D
Wāhitau tango mōkihi tāutanga waehere pūtake kē atu:
https://mirrors.edge.kernel.org/pub/linux/kernel/
linux-4.xx.xx.tar.xz
linux-4.xx.xx.tar.gz
E whakaaetia ana ngā hōputu e rua, he nui ake te tere kōpeketanga o te tar.xz, ā, he iti ake te rahi kōnae.
Tikiake ipurangi: wget https://mirror.tuna.tsinghua.edu.cn/kernel/v4.x/linux-4.17.11.tar.xz
4. Wetekina te waehere kernel
Kia wetewetehia, tomohia te kōpaki pūtake:
tar -xvJf linux-4.17.11.tar.xz
Hei whakarite kia tino ma te rākau kernel, tomo ki te whaiaronga kernel ka whakahaere i te whakahau make mrproper:
CD linux-4.17.11
kia ma, kia tika hoki

5. Whirihoranga o te kernel
Tāruatia te kōnae whirihoranga kernel o nāianei
Ko te config-3.10.0-862.el7.x86_64 te kōnae whirihoranga kernel o taku taiao o nāianei, whakarerekētia kia rite ki te āhuatanga tūturu
cp /boot/config-3.10.0-862.el7.x86_64 .config
Whirihoranga matatau
Ka whakahohea a y, ka monoa a n, ā, ka whakahohea a m ina hiahiatia.
hanga menuconfig: atanga ncurses tawhito, kua whakakapia e nconfig
hanga nconfig: Atanga ncurses raina whakahau hou
6. Hangaia, tāutahia hoki
Hangaia te kernel
Mena he mīhini matua-whā tāu, ka taea e te x te 8
hanga -jx
Tāutahia te kernel
I muri i te whakahiato i te kernel, tāuta: Whakatūpato: Mai i konei, me whai mana pakiaka koe ki te whakahaere i ngā whakahau, ki te kore ka rahua.
hanga modules_install tāuta
7. Whakatūria te tīmatanga
Tirohia te raupapatanga tīmatanga
[pūtake@localhost ~]# awk -F\' '$1=="taurangi " {tā $2}' /etc/grub2.cfg
CentOS Linux (4.17.11-1.el7.elrepo.x86_64) 7 (Matua)
CentOS Linux (4.9.9-1.el7.elrepo.x86_64) 7 (Matua)
CentOS Linux (3.10.0-957.el7.x86_64) 7 (Matua)
CentOS Linux (0-rescue-b91f945269084aa98e8257311ee713c5) 7 (Matua)
Tautuhia te raupapa whakaara
[pakiaka@localhost ~]# grub2-tautuhi-taunoa 0
Tīmata anō kia whai mana
[pakiaka@localhost ~]# whakaara anō


Ngā Hua e Pā Ana

01

LET'S TALK ABOUT YOUR PROJECTS

  • sinsmarttech@gmail.com
  • 3F, Block A, Future Research & Innovation Park, Yuhang District, Hangzhou, Zhejiang, China

Our experts will solve them in no time.