从Debian sarge升级到etch详解


Debian官方建议使用aptitude来管理包,实践证明aptitude比apt-get能更好的处理包依赖的问题,所以下面的操作均以aptitude为例,需要说明的是一旦用了aptitude,就不要再混用apt-get。

  本文假定用户没有安装X windows系统,毕竟Debian更适合于做服务器,桌面还是用Ubuntu吧。

  1、备份
  将系统中重要的系统文件做备份,一般是配置文件、数据库等

  # tar -cvf /home/backup/etc.bak /etc/*

  2、准备升级环境
  升级的过程中会重启一些服务,所以千万不要通过telnet、ssh远程连接方式进行升级,最好在本机的终端窗口下操作(不要在X windows),或者通过modem的serial口远程登录。(这跟telnet、ssh的远程连接有所区别,cisco等网络设备经常会用到这种方式)

  3、检查系统软件包状态
  系统中如果有软件包处于hold状态,则在升级过程中可能失败,最好手工将他们设为unhold

  # aptitude search "~ahold" | grep "^.h"
  # aptitude unhold pkg_name

  注意,如果sarge系统中使用了非官方的软件包,例如backports,最好先将他们全部卸载,否则升级过程中会引起冲突。

  4、更改source.list
  # vi /etc/apt/source.list
  --------snip----------
  # deb http://debian.cn99.com/debian sarge main contrib non-free
  deb http://debian.cn99.com/debian etch main contrib non-free
  # deb-src http://debian.cn99.com/debian sarge main contrib non-free
  deb-src http://debian.cn99.com/debian etch main contrib non-free
  --------snip----------

  中国一般用cn99源,速度比较快,只需要将sarge改为etch就可以了。

  5、更新软件包列表
  # aptitude update
  • 1
  • 2
  • 下一页
【内容导航】
第1页:从Debian sarge升级到etch详解 第2页:从Debian sarge升级到etch详解

相关内容

    暂无相关文章