Monday, May 27, 2013

Upgrading Debian From Squeeze to Wheezy

Today PHP version 5.4 is needed some how on Debian Squeeze and after a little bit search on web I decided to update whole system to Debian Wheezy. By default, Debian Squeeze come up with PHP 5.3. Also it is possible to work with 5.4 on Squeeze but it needs much more effort to upgrade (I tried to compile PHP and failed). Anyway, Below procedure is successful to upgrade whole new Debian system.

Before starting, take your back-ups and your own risk :)



1. Update your sources list file.
find / -name sources.list
nano /etc/apt/sources.list
deb http://ftp.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.debian.org/debian/ squeeze main contrib non-free

deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

# squeeze-updates, previously known as 'volatile'
deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
2. Update and upgrade all installed packages from Squeeze repo.
apt-get update
apt-get upgrade
apt-get dist-upgrade
3. Control the half installed or non-installed packages.
dpkg --audit
dpkg --get-selections | grep hold
This grep must return anything.
apt-get install aptitude
aptitude
4. Update Squeeze repository to Wheezy again with your sources.list file.
deb http://ftp.debian.org/debian wheezy main contrib non-free
deb-src http://ftp.debian.org/debian wheezy main contrib non-free
deb http://ftp.debian.org/debian wheezy-updates main contrib non-free
deb http://ftp.debian.org/debian-security wheezy/updates main contrib non-free

You can also generate your sources.list via http://debgen.simplylinux.ch/
5. Update your whole system.

This steps are important follow the instructions when the installer on running.
apt-get update
apt-get upgrade
apt-get dist-upgrade
or
aptitude update
aptitude full-upgrade
and
reboot

No comments:

Post a Comment