DigitalOcean云服务器升级最新内核Kernel版本图文教程
眾所周知DigitalOcean云服務器是基于Linux系統的,這就意味著在使用DigitalOcean過程中若沒有升級到最新Linux內核Kernel版本的話就影響機器的運行。本文將和大家介紹下DigitalOcean云服務器升級最新內核版本的操作步驟。
先決條件:
1、確保Droplet方案使用的是internal kernels(內置內核);
2、使用軟件包管理器升級內核;
3、關閉電源并且重新開啟電源。
一、確定Droplet方案內核管理方式
在升級內核之前,需要確定DigitalOcean Droplet方案是采用哪種內核進行管理的。
默認情況下,2017年3月之后創建的Droplet 美國VPS方案默認使用的是internal kernels(內部內核),而在此之前的Droplet云服務器VPS方案采用的是GrubLoader內核。
如果不確定你的Droplet云服務器VPS方案內核管理,可以進入DigitalOcean后臺管理面板,然后點擊“Kernel”菜單選項,如果你看到以下英文內容,說明使用的是internal kernels:
The kernel for this Droplet is not managed within the control panel. Instead, you can upgrade the kernel from within the Droplet.
相反,如果看到“Change”按鈕,并且有以下英文內容的話,那么就是GrubLoader內核,如下所示:
This will update your configuration. Then power off the server from the command line and boot it from the control panel and the new kernel will be active. To revert, simply select ‘Original Kernel’ and follow the same process.
所以,如果是GrubLoader內核管理的話,那么需要將它更換為internal kernels,方法也很簡單,直接點擊“Change”按鈕進行更改即可:
更改之后,記得關閉電源并重啟電源。
二、更新內核版本
使用internal kernels內核之后就可以升級版本了,不過在升級內核之前,可以使用uname -ir命令獲取Droplet云服務器方案當前正在使用的內核版本以及系統體系結構(即32位或64位)。
uname -ir命令輸出結果看起來類似于3.13.0-43-generic x86_64,前一部分是(本示例中即3.13.0-43-generic)是Droplet的當前內核版本,第二部分是操作系統架構(本示例中即x86_64),即64位。
接下來如果要將DigitalOcean Droplet云服務器VPS升級到最新的內核版本,可以通過以下兩種方法進行:
1、更新所有軟件包:如果可以的話,將所有可用的軟件包升級應用到服務器可以獲取最新的穩定內核。
2、僅更新內核:僅將內核定向為更新不會修改服務器上的任何其他軟件包。
可以根據操作系統類型選擇相應的命令進行更新:
操作系統
更新所有軟件包命令
僅更新內核命令
Ubuntu
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get update
sudo apt-get install linux-virtual
Debian (64-bit)
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get update
sudo apt-get install linux-image-amd64 linux-headers-amd64
Debian (32-bit)
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get update
sudo apt-get install linux-image-686-pae linux-headers-686-pae
CentOS
sudo yum update
sudo yum update kernel
Fedora
sudo dnf update
sudo dnf update kernel
三、關閉并重啟電源
設置完成之后,需要關閉電源(并不是重啟),以便Droplet云服務器VPS獲得最新的虛擬化進程,務必要重啟電源,否則內核版本升級不會生效,可以輸入以下命令重啟電源:
sudo poweroff
關閉電源之后,可以進入DigitalOcean后臺面板重啟電源。首先點擊相應的“Droplet”方案名稱,跳轉到詳細頁面之后點擊“OFF”按鈕以重新開啟電源。
重新啟動電源之后,可以再次輸入“uname -ir”命令查看是否已經將kernel(內核)升級到最新版本。
以上就是這次DigitalOcean云服務器升級最新內核版本的方法,這里再次建議大家在使用DigitalOcean Droplet方案時,最好是將Linux內核升級為最新版本,以便保證系統的穩定性和安全性。
(本文由美國主機偵探原創,轉載請注明!)
微信掃碼加好友進群
主機優惠碼及時掌握
0贊
標簽:DigitalOcean
.entry-tags .tag-links a{text-decoration:none;}
.single #primary .entry-footer .entry-like a{text-decoration: none;}
/*短代碼*/
.couponPost{display: flex;flex-direction: row;font-size: 15px;padding: 15px 0px;border-bottom: 1px dashed #ccc;overflow:hidden;}
.couponPost .couponPostRight{margin-left: 20px;overflow: hidden;width: 616px;display: flex;flex-direction: column;justify-content: space-between;}
.couponPost .couponPostLeft{position: relative;overflow:hidden;width:166px;height:130px;}
.couponPostImage{height: 100%;display: flex;border: 1px solid #ccc;border-radius: 5px;}
.couponPostRight h2.title{margin-bottom:0;font-size:16px;}
.couponPostDesc{text-align: justify;}
.couponPostLeft .couponPostImage::before{content: \'促銷\';position: absolute;color: #fff;background-color: red;font-size: 14px;width: 88px;transform: rotate(-45deg);top: 9px;left: -23px;text-align: center;}
.couponPostRight h2.title a{color: #333;text-decoration: none;}
a.linkPost{display: inline-block;color: #E14036;padding: 0px 10px;border: 1px dashed #e14036;background-color: #FFD886;line-height: 20px;}
.couponPostLink a{margin-left:0!important;text-decoration:none;}
.imageNone::before{content:none!important;}
總結
以上是生活随笔為你收集整理的DigitalOcean云服务器升级最新内核Kernel版本图文教程的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 云服务器配置选择
- 下一篇: 函数没有“as”子句;假定返回类型为 o