Upgrading Debian OS
- KnowledgeBase /
- Hébergement web /
- Upgrading Debian OS
Expertise level: Medium
Before proceeding on your own, we highly recommend you test the upgrade on a second non-critical server prior to performing the upgrade.
You should install all available updates for Debian 6 before upgrading to Debian 7 (wheezy). Here's how:
Update your package lists by entering the following command:
sudo apt-get update
Install the updates by entering the following command:
sudo apt-get upgrade
Any available updates for Debian 6 will be installed.
Stopping Services
We recommend that you stop as many services as possible before upgrading to Debian 7. This includes web server daemons (Apache and nginx), database servers (PostgreSQL and MySQL), and any other non-critical services. To stop a service, enter the following command, replacing apache2 with the name of the service you want to stop:
sudo service apache2 stop
Starting a Screen Session
We recommend that you start a screen session to ensure updates will continue to install in the unlikely event you are disconnected during the upgrade process. Here's how to install screen and start a screen session:
Installer l'écran en saisissant la commande suivant
sudo apt-get install screen
Une fois l'installation terminée, démarrez une session screen en saisissant la commande suivante :
screen
Si vous êtes déconnecté de votre serveur, vous pouvez vous reconnecter à la session screen en saisissant la commande suivante :
screen -Dr
Vous êtes maintenant prêt à installer Debian 7.
Mise à niveau vers Debian 7
Edit your /etc/apt/sources.list file and change all instances of squeeze to wheezy. Once you're done, your /etc/apt/sources.list should look like this:
Extrait de fichier :/etc/apt/sources.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
Update your package lists with the following command:
sudo apt-get update
Enter the following command to grab the latest versions of key system utilities:
sudo apt-get install apt dpkg aptitude
After the package updates have completed, upgrade your system by entering the following command. The upgrade will download and install numerous packages. This step may take a while to complete.
sudo apt-get dist-upgrade
NOTE: Services using Network Security Services (NSS) and Pluggable Authentication Modules (PAM) will need to be restarted. In most cases the default list of services to be restarted is fine. If you have additional services that use NSS or PAM, add them to the list.
Once the system is updated, reboot your system to make sure that there were no problems during the upgrade.
Troubleshooting Problems
Errors about packages that are removed and not purged may be resolved by installing the latest version of the software or purging the old package. For example, if you receive an error about MySQL, you could try to resolve the issue by entering the following command:
apt-get install mysql-server
If the above step does not work for the package you are trying to install, you may purge the package with the following command after ensuring that you have a backup of the program's data and configuration:
apt-get remove --purge mysql-server
Open ticket
Submit a support ticket