Debian 6的系統,最近已經推出Debian 7了,所以基於安全考量,就準備進行升級,升級方法如下,雖然簡單,但也碰到小麻煩,就是PHP正式取消了register_globals and register_long_arrays 兩項設定,若是程式中有用到這些設定的,可能需要調整,不然會「掛點」!
1.編輯/etc/apt/source.list,將檔案中的squeeze全部換成wheezy即可,之後查看/etc/apt/source.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。
# 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