Debian升级通用方法

注意跨版本升级有一定危险性,请先备份重要数据,然后暂时停止运行中的环境服务,例如 php server 等等。

更新方法

1. 先将当前版本升级为最新版。

  1. apt-get update
  2. apt-get upgrade

2. 修改源。

vim /etc/apt/sources.list

将所有的 wheezy 改成 jessie

  1. #
  2.  
  3. # deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 NETINST Binary-1 20130504-14:43]/ wheezy main
  4.  
  5. #deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 NETINST Binary-1 20130504-14:43]/ wheezy main
  6.  
  7. deb http://ftp.debian.org/debian/ jessie main
  8. deb-src http://ftp.debian.org/debian/ jessie main
  9.  
  10. deb http://security.debian.org/ jessie/updates main
  11. deb-src http://security.debian.org/ jessie/updates main
  12.  
  13. # wheezy-updates, previously known as 'volatile'
  14. deb http://ftp.debian.org/debian/ jessie-updates main
  15. deb-src http://ftp.debian.org/debian/ jessie-updates main

3. 执行升级。

  1. apt-get update
  2. apt-get upgrade
  3. apt-get dist-upgrade

在执行命令过程中,会有文件冲突,提示是否保持当前版本,一律输入 Y 使用新版。假如遇到 db5.1-util 未升级,则再执行一次 apt-get dist-upgrade 即可。

4. 删除无用组件。

  1. aptget autoremove

5. 重启系统:

reboot

6. 删除无用内核:

apt purge linux-image-3.2.0-4-amd64 -y

更新完成。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

2 × 5 =

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据