首页 > Linux > Xen VPS从Debian 6 (Squeeze)升级到Debian 7 (Wheezy)

Xen VPS从Debian 6 (Squeeze)升级到Debian 7 (Wheezy)

2014年9月21日 LTNS     访问次数 52 发表评论 阅读评论

Xen VPS自带的操作系统最新版本是debian 6(Squeeze),首先用 WinSCP登录 VPS修改一下 /etc/apt/sourcelist 文件里的源,把 squeeze改成 wheezy。

#deb http://ftp.us.debian.org/debian squeeze main
#deb http://security.debian.org/ squeeze/updates main
deb http://ftp.us.debian.org/debian wheezy main
deb http://security.debian.org/ wheezy/updates main

 

然后用 Putty登录 VPS,更新软件源,提示缺少两个 key

apt-get update
#反馈的出错信息如下
...
W: GPG error: http://security.debian.org wheezy/updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553
W: GPG error: http://ftp.us.debian.org wheezy Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 6FB2A1C265FFB764

参考文章 的做法,下载并导入 wheezy的 Archive Keys

wget http://ftp-master.debian.org/keys/archive-key-7.0.asc
apt-key add archive-key-7.0.asc

再次更新,还是提示缺一个 key

apt-get update
#反馈如下
...
W: There is no public key available for the following key IDs:
6FB2A1C265FFB764

于是按 这篇文章 添加 key

gpg --keyserver subkeys.pgp.net --recv-keys 6FB2A1C265FFB764
gpg -a --export 6FB2A1C265FFB764 | apt-key add -

再更新 apt-get就正常了。

顺便检查一下 Debian的密钥包,可以看到最后的两个就是导入的 key

apt-key list
#反馈如下
/etc/apt/trusted.gpg
--------------------
pub   1024D/F42584E6 2008-04-06 [expired: 2012-05-15]
uid                  Lenny Stable Release Key 
 
pub   4096R/55BE302B 2009-01-27 [expired: 2012-12-31]
uid                  Debian Archive Automatic Signing Key (5.0/lenny) 
 
pub   2048R/6D849617 2009-01-24 [expired: 2013-01-23]
uid                  Debian-Volatile Archive Automatic Signing Key (5.0/lenny)
 
pub   4096R/B98321F9 2010-08-07 [expires: 2017-08-05]
uid                  Squeeze Stable Release Key 
 
pub   4096R/46925553 2012-04-27 [expires: 2020-04-25]
uid                  Debian Archive Automatic Signing Key (7.0/wheezy) 
 
pub   4096R/65FFB764 2012-05-08 [expires: 2019-05-07]
uid                  Wheezy Stable Release Key

最后升级到 Wheezy并重启

apt-get upgrade
apt-get dist-upgrade
reboot

 
 

参考文章
http://godontop.com/debian-6squeeze%E5%8D%87%E7%BA%A7%E8%87%B3debian-7wheezy-347
 

分类: Linux 标签: , ,
16 / 4 = (必填)