Debian 7.8 (Wheezy) 升级 Debian 8.0 (Jessie) 备忘及教程

栏目: 服务器 · 发布时间: 6年前

内容简介:Debian 7.8 (Wheezy) 升级 Debian 8.0 (Jessie) 备忘及教程

免责声明

本教程在 Debian 7.8 (Wheezy) 中测试通过,但由于服务器 / VPS的不同,不保证此教程在所有服务器 / VPS中都能正常运行。

因此,请先做完整的备份或者服务器快照!

准备阶段

我测试的是 ikoula 的5欧独立服务器,CPU 是 ATOM 520

root@imlonghao:~# cat /etc/debian_version 
7.8

如果你不是 Debian 7.8 的,请参照下文升级到这个版本(部分被省略)

root@imlonghao:~# apt-get update
Hit http://ftp.debian.ikoula.com wheezy Release.gpg
Hit http://ftp.debian.ikoula.com wheezy Release                          
Hit http://ftp.debian.ikoula.com wheezy/main Sources                                           
Hit http://ftp.debian.ikoula.com wheezy/contrib Sources                                                          
Hit http://ftp.debian.ikoula.com wheezy/non-free Sources                                                         
Hit http://ftp.debian.ikoula.com wheezy/main amd64 Packages                                                      
[...]
Reading package lists... Done 
root@imlonghao:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

升级过程会更新我们系统的内核,因此,如果你对内核有要求的话请谨慎!

这是升级前的内核

root@imlonghao:~# uname -a
Linux imlonghao 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux

这是升级前的 sources.list

root@imlonghao:~# cat /etc/apt/sources.list
deb http://ftp.debian.ikoula.com/debian/ wheezy main contrib non-free
deb-src http://ftp.debian.ikoula.com/debian/ wheezy main contrib non-free

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

# wheezy-updates, previously known as 'volatile'
deb http://ftp.fr.debian.org/debian/ wheezy-updates main
deb-src http://ftp.fr.debian.org/debian/ wheezy-updates main

我们需要将 sources.list 中的 wheezy 替换为 jessie ,运行下面语句

root@imlonghao:~# sed -i "s/wheezy/jessie/g" /etc/apt/sources.list
root@imlonghao:~# cat /etc/apt/sources.list
deb http://ftp.debian.ikoula.com/debian/ jessie main contrib non-free
deb-src http://ftp.debian.ikoula.com/debian/ jessie main contrib non-free

deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

# jessie-updates, previously known as 'volatile'
deb http://ftp.fr.debian.org/debian/ jessie-updates main
deb-src http://ftp.fr.debian.org/debian/ jessie-updates main

开始升级

更新源

root@imlonghao:~# apt-get update
Get:1 http://ftp.debian.ikoula.com jessie Release.gpg [2,390 B]
Get:2 http://ftp.debian.ikoula.com jessie Release [126 kB]                                                     
Get:3 http://ftp.debian.ikoula.com jessie/main Sources [7,065 kB]                                     
Get:4 http://security.debian.org jessie/updates Release.gpg [1,571 B]                                   
Get:5 http://security.debian.org jessie/updates Release [61.5 kB]                                                            
[...]            
Fetched 20.1 MB in 9s (2,208 kB/s)                                                                                                                                                                      
Reading package lists... Done

开始更新,这里可能会比较耗时,不过我的 Atom 服务器用时也不长。

如果你的服务器丢包严重,建议使用 screen

root@imlonghao:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  [...]
The following NEW packages will be installed:
  [...]
The following packages have been kept back:
  [...]
The following packages will be upgraded:
  [...]
322 upgraded, 197 newly installed, 3 to remove and 1 not upgraded.
Need to get 221 MB of archives.
After this operation, 387 MB of additional disk space will be used.
Do you want to continue [Y/n]?

更新完后, reboot 重启系统

更新完毕

重启系统后,我们就可以看到我们现在已经成功更新到 Debian8.0 了,而内核也有了升级。

root@imlonghao:~# cat /etc/debian_version 
8.0
root@imlonghao:~# uname -a
Linux imlonghao 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64 GNU/Linux

以上所述就是小编给大家介绍的《Debian 7.8 (Wheezy) 升级 Debian 8.0 (Jessie) 备忘及教程》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

深入浅出程序设计(中文版)

深入浅出程序设计(中文版)

Paul Barry、David Griffiths / 蒋雁翔、童健 / 东南大学出版社 / 2012-1 / 98.00元

《深入浅出程序设计(中文版)》介绍了编写计算机程序的核心概念:变量、判断、循环、函数与对象——无论运用哪种编程语言,都能在动态且多用途的python语言中使用具体示例和练习来运用并巩固这些概念。学习基本的工具来开始编写你感兴趣的程序,而不是其他人认为你应该使用的通用软件,并对软件能做什么(不能做什么)有一个更好的了解。当你完成这些,你就拥有了必要的基础去使用任何一种你需要或想要学习的语言或软件项目......一起来看看 《深入浅出程序设计(中文版)》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

随机密码生成器
随机密码生成器

多种字符组合密码

URL 编码/解码
URL 编码/解码

URL 编码/解码