https://ma.ttias.be/reinstall-the-linux ... s-or-rhel/
One would expect that yum's reinstall command would do the trick, but alas -- it does not.
# yum reinstall kernel
Package kernel-2.6.18-194.32.1.el5.x86_64 is allowed multiple installs, skipping
Package kernel-2.6.18-274.12.1.el5.x86_64 is allowed multiple installs, skipping
Package kernel-2.6.18-194.el5.x86_64 is allowed multiple installs, skipping
Package kernel-2.6.18-308.1.1.el5.x86_64 is allowed multiple installs, skipping
Package kernel-2.6.18-308.11.1.el5.x86_64 is allowed multiple installs, skipping
Nothing to do
To reinstall the kernel, you actually have to remove it first and then install it again. You can remove your currently running kernel since it's operating completely from memory and does not rely on the physical files at the moment you're trying to reinstall it. So, first find out your current version.
# uname -r
2.6.18-308.11.1.el5
List the installed kernels
See what other kernels you may have installed.
# rpm -qa | grep kernel | sort
kernel-2.6.18-194.32.1.el5
kernel-2.6.18-194.el5
kernel-2.6.18-274.12.1.el5
kernel-2.6.18-308.1.1.el5
kernel-2.6.18-308.11.1.el5
kernel-headers-2.6.18-308.1.1.el5
Remove obsolete kernels
If you don't need the older kernels, you can safely remove them. You should keep at least one extra, just in case this reinstall fails (or if the new kernel is giving you problems).
# yum remove kernel-2.6.18-194.32.1.el5 kernel-2.6.18-194.el5
Reinstall the Linux Kernel via RPM/Yum
Now, to reinstall the kernel you want, first remove it by specifying the exact version (usually the currently running kernel, see uname -r above).
# yum remove kernel-2.6.18-308.11.1.el5
=====================================================================
Package Arch Version Repository Size
=====================================================================
Removing:
kernel x86_64 2.6.18-308.11.1.el5 installed 98 M
Transaction Summary
=====================================================================
Remove 1 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Is this ok [y/N]: y
Confirm that the kernel is actually removed.
# rpm -qa | grep kernel | sort -n
kernel-2.6.18-308.1.1.el5
kernel-headers-2.6.18-308.11.1.el5
It's not showing up (only the older kernel), so reinstall it.
# yum install kernel-2.6.18-308.11.1.el5
=======================================================================
Package Arch Version Repository Size
=======================================================================
Installing:
kernel x86_64 2.6.18-308.11.1.el5 updates 21 M
Transaction Summary
=======================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 21 M
Is this ok [y/N]: y
Verify the new Linux Kernel is installed
And you should see the Kernel appear again.
# rpm -qa | grep kernel | sort -n
kernel-2.6.18-308.11.1.el5
kernel-2.6.18-308.1.1.el5
kernel-headers-2.6.18-308.11.1.el5
After that, reboot the server again to make sure everything went as expected and you should have a cleanly reinstalled Linux Kernel available to you (for whatever reason this may have been necessary).
Reinstall the Linux Kernel on CentOS or RHEL
前往
- Software
- ↳ CodeCharge Studio
- ↳ CodeCharge
- ↳ DemoCharge
- ↳ SuperPDF
- ↳ 551einv
- ↳ E3進銷存
- 程式語言
- ↳ PHP
- ↳ CodeLobster PHP Edition
- ↳ Yii
- ↳ CodeIgniter
- ↳ Phalcon
- ↳ Symfony
- ↳ FuelPHP
- ↳ Zend Framework 2
- ↳ laravel
- ↳ WordPress
- ↳ ASP.NET/C#
- ↳ ASP/VBScript
- ↳ JSP
- ↳ Java Servlets
- ↳ ColdFusion
- ↳ Perl
- ↳ Java Script
- ↳ jQuery
- ↳ HTML + CSS
- ↳ jQuery
- ↳ nodejs
- ↳ VB6
- ↳ Git
- ↳ App Inventor 2
- ↳ bash
- ↳ C++/ VC/ OpenCV
- ↳ OpenCV
- ↳ go
- ↳ cordova
- ↳ python
- ↳ Xamarin
- ↳ Assembly
- 資料庫
- ↳ MySQL
- ↳ PostgreSQL
- ↳ ORACLE
- ↳ Access
- ↳ SQL Server
- ↳ SQLite
- ↳ MariaDB
- ↳ Mongodb
- 作業系統
- ↳ Linux
- ↳ Ubuntu
- ↳ CentOS
- ↳ Mint
- ↳ Mandriva
- ↳ Debian
- ↳ Red Hat Enterprise Linux
- ↳ Oracle Linux
- ↳ Fedora
- ↳ Kali Linux
- ↳ OpenSUSE
- ↳ Elementary OS
- ↳ Microsoft
- ↳ Server 2008 R2
- ↳ Server 2012 R2
- ↳ Server 2012
- ↳ 8
- ↳ 10
- ↳ System Center 2016
- ↳ NOVELL
- ↳ FreeBSD
- ↳ VMware
- ↳ VirtualBox
- ↳ Mac OS X
- ↳ Solaris
- ↳ iOS
- ↳ Android
- ↳ Cloud
- ↳ OpenStack
- ↳ Docker
- ↳ Proxmox VE
- ↳ CloudReady
- ↳ chrome
- 網頁伺服器
- ↳ apache
- ↳ tomcat
- ↳ nginx
- ↳ IIS
- ↳ JBoss
- ↳ weblogic
- ↳ WebHosting
- 硬體
- ↳ 硬體及週邊
- ↳ RouterOS
- ↳ LEGO NXT
- ↳ Arduino
- ↳ MSP430
- ↳ Raspberry Pi
- ↳ OpenERP
- ↳ Storage
- ↳ Server
- ↳ Brocade
- ↳ MODELS
- ↳ FortiGate
- 軟體
- ↳ sublime
- ↳ LibreNMS