菜单

Debian升级

2016年08月24日 - linux

Debian 6(Squeeze)升级至Debian 7(Wheezy) (7级8同理)
Debian GNU/Linux支持滚动更新,出于安全方面的考虑,当新版Debian发行后,我们一般会将现有版本的Debian升级至最新的稳定版的Debian。升级除了可以提升系统的安全性以外,同时还可以获得由更新版本的应用软件带来的新功能及其它好处。这就是我们为什么要将Debian 6(Squeeze)升级至Debian 7(Wheezy)的原因。

1. 编辑/etc/apt/source.list文件

编辑/etc/apt/source.list文件,将文件中的squeeze全部换成wheezy即可,之后查看/etc/apt/source.list文件,其内容应大致如下:

root@godontop:~# cat /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ wheezy main
deb-src http://ftp.us.debian.org/debian/ wheezy main

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

# wheezy-updates, previously known as ‘volatile’
deb http://ftp.us.debian.org/debian/ wheezy-updates main
deb-src http://ftp.us.debian.org/debian/ wheezy-updates main

2.更新软件包列表

# apt-get update

//如果更新软件包列表时,提示:
W: There is no public key available for the following key IDs:
8B48AD6246925553
则需要导入Debian 7(Wheezy)的Archive Keys。

Debian Archive Signing Keys下载页面:http://ftp-master.debian.org/keys.html
# wget http://ftp-master.debian.org/keys/archive-key-7.0.asc
# apt-key add archive-key-7.0.asc

之后重新更新软件包列表就不会提示该警告了。
# apt-get update

3.更新最小化的基本系统

# apt-get upgrade

4.升级剩下的系统

# apt-get dist-upgrade

5.重启系统

# reboot

6.验证系统

# lsb_release -a
# cat /etc/debian_version

7.检查内核

# uname -msr

8.删除不再需要的软件包

# apt-get autoremove && apt-get autoclean

发表评论

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