さくらVPSのDebianを squeeze から wheezy にアップデートした。
さくらのVPSを Debian squeeze から wheezy にアップデートした。
source.list の更新
まず初めに source.list の更新。
で生成できる。
国を Japan、version を wheezy、アーキテクチャーを32bit、その他チェック項目を全部選択した。
生成された項目を以下に書き込む。
/etc/apt/source.list
書き換える際にwheezy がstableになったときにtesting は次のものをさすので書き換えとく。
# source.list diff - deb http://ftp.jp.debian.org/debian testing main contrib non-free - deb-src http://ftp.jp.debian.org/debian testing main contrib non-free + deb http://ftp.jp.debian.org/debian wheezy main contrib non-free + deb-src http://ftp.jp.debian.org/debian wheezy main contrib non-free deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free deb-src http://ftp.debian.org/debian/ wheezy-updates main contrib non-free deb http://security.debian.org/ wheezy/updates main contrib non-free deb-src http://security.debian.org/ wheezy/updates main contrib non-free
次に apt-get 関連
$ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get dist-upgrade
上記がおわったら
$ cat /etc/debian_version
で7.0になってれば成功。
エラー
dist-upgrade の最中に以下のエラーがでた。
NB: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
というエラーがでた。
ここを参考に以下のように書き加えた。
# visudo Defaults secure_path = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
を追加して解決した。