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
Iarr Luachan
Trí bhealach chun croílár chóras CentOS ríomhaire tionsclaíoch a uasghrádú
Blag

Trí bhealach chun croílár chóras CentOS ríomhaire tionsclaíoch a uasghrádú

2024-10-17 15:08:44

Le linn úsáid CentOS, is dosheachanta an eithne a uasghrádú, ach uaireanta mar gheall ar shaincheisteanna spleáchais ar thiomsú cód foinse, ní thacaíonn gach clár leis an leagan is déanaí den eithne, mar sin tabharfar isteach trí bhealach chun an eithne a uasghrádú sa mhéid seo a leanas.

Nóta:
Maidir le cineálacha eithne:
Is é an giorrúchán de [mainline stable] sa Bhéarla an focal *ml* i kernel-ml, agus tá an leagan is déanaí de na leaganacha cobhsaí den phríomhlíne liostaithe in elrepo-kernel.
Is é an lt i kernel-lt an giorrúchán de [long term support] sa Bhéarla, agus tá an leagan tacaíochta fadtéarmach liostaithe in elrepo-kernel.
Seiceáil leagan an eithne
uainm -r

Íomhá 1
Clár Ábhair

1. suiteáil yum

1. Iompórtáil foinse an stórais
rpm --allmhairiú 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. Féach ar na pacáistí insuiteáilte
yum --enablerepo="elrepo-kernel" liosta --showduplicates | sórtáil -r | grep
eithne-ml.x86_64
3. Roghnaigh leagan ML nó LT le suiteáil
Mura sonraítear aon leagan, suiteáiltear an leagan is déanaí de réir réamhshocraithe
Suiteáil leagan ML
suiteáil eithne-ml-forbairt eithne-ml -y yum --enablerepo=elrepo-kernel
Suiteáil leagan LT, roghnaigh é seo do gach K8S
yum --enablerepo=elrepo-kernel suiteáil kernel-lt-devel kernel-lt -y
4. Seiceáil an seicheamh tosaithe eithne reatha
awk -F\' '$1=="iontráil roghchláir " {priontáil $2}' /etc/grub2.cfg
5. Athraigh an mhír tosaithe réamhshocraithe
Is é xxx an uimhir sraitheach, a shonraíonn an xú mír sa liosta tosaithe mar an mhír tosaithe, agus tosaíonn x ag comhaireamh ó 0
grub2-set-default xxxx
Mar shampla, más mian leat é a shocrú chun tosaithe le croí 4.4
ansin cuir isteach "grub2-set-default 0" go díreach, agus is féidir leat tosú ó 4.4 an chéad uair eile a thosóidh tú.
Seiceáil an seicheamh tosaithe eithne
[root@localhost ~] awk -F\' '$1=="iontráil roghchláir " {priontáil $2}' /etc/grub2.cfg
CentOS Linux (4.4.179-1.el7.elrepo.x86_64) 7 (Croílár)
CentOS Linux (3.10.0-693.el7.x86_64) 7 (Croílár)
CentOS Linux (0-tarrthála-6d4c599606814867814f1a8eec7bfd1e) 7 (Croílár)
Socraigh an uimhir seicheamh tosaithe
[root@localhost ~] grub2-set-default 0
Atosaigh
atosú
Seiceáil leagan an eithne
uainm -r

Íomhá 2

2. Suiteáil RPM

Seiceáil leagan an eithne
uainm -r
1. Aimsigh an leagan
Ós rud é gurb é foinse ELRepo an leagan is déanaí, ní féidir an seanleagan den eithne a íoslódáil ach de láimh.
Aimsigh an leagan stairiúil de rpm an eithne:
http://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/
2. Ní mór duit trí chineál rpm a íoslódáil
wget
http://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/kernel-lt
forbairt-4.4.215-1.el7.elrepo.x86_64.rpm
wget
http://mirrors.coreix.net/elrepo-archive-archive/kernel/el7/x86_64/RPMS/kernel-lt
ceanntásca-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. Suiteáil an eithne
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

# Suiteáil gach rud le cliceáil amháin
rpm -Uvh *.rpm
4. Deimhnigh an leagan eithne suiteáilte
[root@localhost ~]# rpm -qa | eithne grep
ceanntásca-eithne-3.10.0-1160.15.2.el7.x86_64
forbairt-eithne-3.10.0-1160.49.1.el7.x86_64
eithne-uirlisí-leabharlanna-3.10.0-957.el7.x86_64
eithne-3.10.0-957.el7.x86_64
eithne-ml-4.9.9-1.el7.elrepo.x86_64
eithne-lt-4.4.215-1.el7.elrepo.x86_64
uirlisí-eithne-3.10.0-957.el7.x86_64
kernel-lt-devel-4.4.215-1.el7.elrepo.x86_64

5. Socraigh an tosaithe
Seiceáil an t-ord tosaithe
[root@localhost ~]# awk -F\' '$1=="iontráil roghchláir " {priontáil $2}' /etc/grub2.cfg
CentOS Linux (4.4.215-1.el7.elrepo.x86_64) 7 (Croílár)
CentOS Linux (4.9.9-1.el7.elrepo.x86_64) 7 (Croílár)
CentOS Linux (3.10.0-957.el7.x86_64) 7 (Croílár)
CentOS Linux (0-tarrthála-b91f945269084aa98e8257311ee713c5) 7 (Croílár)
Socraigh an t-ord tosaithe
[root@localhost ~]# grub2-set-default 0
Atosaigh le go dtiocfaidh sé i bhfeidhm
[root@localhost ~]# atosú

3. Suiteáil cód foinse

1. Suiteáil an pacáiste bogearraí lárnach
suiteáil yum -y gcc déan git ctags ncurses-devel openssl-devel
suiteáil yum -y bison flex elfutils-libelf-devel bc
2. Cruthaigh eolaire tiomsaithe eithne
Úsáid an eolaire kernelbuild faoi home
mkdir ~/tógáil eithne
3. Faigh an cód foinse eithne
Suíomh scátháin Ollscoil Tsinghua:
https://mirror.tuna.tsinghua.edu.cn/kernel/v4.x/?C=M&O=D
Seoladh íoslódála pacáiste suiteála cód foinse eile:
https://mirrors.edge.kernel.org/pub/linux/kernel/
linux-4.xx.xx.tar.xz
linux-4.xx.xx.tar.gz
Tá an dá fhormáid inghlactha, tá ráta comhbhrúite níos airde agus méid comhaid níos lú ag tar.xz.
Íoslódáil ar líne: wget https://mirror.tuna.tsinghua.edu.cn/kernel/v4.x/linux-4.17.11.tar.xz
4. Dízipeáil an cód eithne
Tar éis é a dhízipeáil, cuir isteach an eolaire foinse:
tar -xvJf linux-4.17.11.tar.xz
Chun a chinntiú go bhfuil crann an eithne glan go hiomlán, téigh isteach san eolaire eithne agus cuir an t-ordú make mrproper i gcrích:
cd linux-4.17.11
déan glan & déan míchuí

5. Cumraíocht an eithne
Cóipeáil an comhad cumraíochta eithne reatha
Is é config-3.10.0-862.el7.x86_64 comhad cumraíochta an eithne de mo thimpeallacht reatha, déan é a mhodhnú de réir an cháis iarbhír.
cp /boot/config-3.10.0-862.el7.x86_64 .config
Cumraíocht ardleibhéil
Tá y cumasaithe, tá n díchumasaithe, agus tá m cumasaithe nuair is gá.
déan menuconfig: sean-chomhéadan ncurses, curtha ina áit ag nconfig
déan nconfig: Comhéadan ncurses nua líne ordaithe
6. Tiomsú agus suiteáil
Tiomsaigh an eithne
Má tá meaisín ceithre-chroí agat, is féidir le x a bheith 8
déan -jx
Suiteáil an eithne
Tar éis an eithne a thiomsú, suiteáil: Rabhadh: As seo amach, beidh ceadanna fréimhe ag teastáil uait chun orduithe a fhorghníomhú, nó teipfidh air.
déan modúil_suiteáil suiteáil
7. Socraigh an tosaithe
Seiceáil an seicheamh tosaithe
[root@localhost ~]# awk -F\' '$1=="iontráil roghchláir " {priontáil $2}' /etc/grub2.cfg
CentOS Linux (4.17.11-1.el7.elrepo.x86_64) 7 (Croílár)
CentOS Linux (4.9.9-1.el7.elrepo.x86_64) 7 (Croílár)
CentOS Linux (3.10.0-957.el7.x86_64) 7 (Croílár)
CentOS Linux (0-tarrthála-b91f945269084aa98e8257311ee713c5) 7 (Croílár)
Socraigh ord tosaithe
[root@localhost ~]# grub2-set-default 0
Atosaigh le go dtiocfaidh sé i bhfeidhm
[root@localhost ~]# atosú


Táirgí Gaolmhara

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.