Show Table of Contents
9.12.2. 使用安裝程式來升級
注意
一般來說,Red Hat 建議使用者在獨立的
/home 分割區上儲存使用者的資料,然後進行全新的安裝。欲知分割區的詳細資訊以及設定方式,請參閱 節 9.13, “磁碟分割設定”。
如果您選擇使用安裝程式來更新現有的系統,任何不是由 Red Hat Enterprise Linux 所提供、會與 Red Hat Enterprise Linux 產生衝突的軟體皆會被覆蓋過去。在以這種方式升級之前,請列出現有的套件清單,以供日後存查:
rpm -qa --qf '%{NAME} %{VERSION}-%{RELEASE} %{ARCH}\n' > ~/old-pkglist.txt
安裝完成之後,請檢視這清單,看看哪些套件需要重新建立、或從非 Red Hat 的軟體庫存取。
接下來,請備份所有系統配置資料:
su -c 'tar czf /tmp/etc-`date +%F`.tar.gz /etc'
su -c 'mv /tmp/etc-*.tar.gz /home'
在進行升級前,請完整備份所有重要資料。重要資料包括整個
/home/ 目錄的內容,以及系統服務(例如 Apache、FTP、SQL Server)與原始碼管理系統的內容。雖然升級不是破壞性的,但如果升級過程出了問題,會有資料遺失的可能性發生。
警告
請注意,以上範例會將
/home/ 目錄製作備份。如果您的 /home/ 目錄並不是在獨立的分割區上,那麼「請千萬不要使用這些範例」!請將備份文件儲藏在其它裝置上,例如光碟片或外部硬碟。
欲取得更多有關於升級過程完成之後的相關資訊,請參閱 節 35.2, “完成升級”。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.