Preparing Debian 7 for the upgrade
Before upgrading to new Debian 8, I strongly suggest you to backup all important data and configuration files in your system. Also, notify all other users who are currently using the system to take full backup of all their data. The important files/folders that needs to be backup are:
- /etc/
- /var/lib/dpkg
- /var/lib/apt/extended_states
- If you use aptitude, you must also backup: /var/lib/aptitude/pkgstates
- And backup the output of the following command:
We are hiring! We are looking for tutorials, tips & tricks, reviews, and news analysis. If you are interested, fill this form and contact us now!
Stop all running services, such as apache, nginx, mysql, or postgresql.
To stop a running service, for example nginx, run:
Upgrade to Debian 8 Desktop
Here, We’ll be discussing how to upgrade to Debian 8 Jessie desktop from Debian 7 Wheezy.
Switch to root user:
Edit /etc/apt/sources.list file,
Change all instances of wheezy to jessie.
This is how my sources.list file looked after replaced the line wheezy with jessie.
Run the following command to update packages list:
Then, run the minimal upgrade:
During upgrade process, you’ll be asked to disable or enable ssh to root user. Enabling ssh for root user is such a bad idea. So, let’s disable it.
A word of caution: If you disable ssh password authentication for root user, you no longer can access your Debian desktop from a remote system using root user. In such cases, you can ssh to your Debian desktop from a non-administrative user, for example sk.
Wait for a while to complete the upgrade.
Before rebooting your machine, It is advisable to purge old packages.
To do that, run:
Sample output:
Remove all old and unnecessary packages using commands:
Finally, reboot your system.
Log in to the new Debian 8 Jessie desktop.
Usually, Debian doesn’t allow non-administrative users to install/remove packages usingsudo. We must manually add the users to the sudoers list to perform some administrative tasks.
To add non-administrative users to the sudoers list, do the following.
To do that, switch to root user:
Run the following command to install sudo:
Add the current user(non-administrative user) to sudo group, for example my system user name is sk:
Then, grant the sudo permission to the user sk.
To do that, edit:
Add the following line:
Save and quit the file.
Type exit to return back to the normal user.
From now on you can install or remove any packages using non-administrative users.
Upgrade to Debian 8 server
If you’re planning to upgrade Debian 8 on your VPS, follow these steps.
Switch to root user, and install screen:
Then, start screen session:
The screen tool will help you to reconnect to your VPS, in case you’re disconnected from it while upgrading.
If you’re disconnected from your VPS, you can re-connect to it using command:
Now, edit /etc/apt/sources.list file,
Change all instances of wheezy to jessie.
This is how my sources.list file looked after replaced the line wheezy with jessie.
Run the following command to update packages list:
Then, run the minimal upgrade:
Finally, run the following command to perform full system upgrade.
Remove all old and unnecessary packages using commands:
Finally, reboot your VPS.
Done!
Possible problems after upgrading to Debian 8
If you got any problems with some packages, for example mysql, just install them again.
Still no luck, completely purge and re-install them as shown below.
While removing mysql-server, the installer will ask you whether to keep the configuration file or not. Just keep the configuration file and continue the installation.
That’s all.
Congratulations! Now, Debian 8 is ready to use.
Nessun commento:
Posta un commento