歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 從Debian sarge升級到etch詳解

從Debian sarge升級到etch詳解

日期:2017/2/28 17:46:15   编辑:Linux教程
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
Copyright © Linux教程網 All Rights Reserved