Upgrading to debian 10

From Lorekeeper Wiki
Revision as of 16:16, 14 July 2022 by Moif (talk | contribs) (Moved to Community Tutorials)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This upgrade is only necessary for folks on the develop branch or otherwise using PHP 8.1 and debian 9, since it is no longer supported. If you're not on the develop branch, you most likely do not need this upgrade.

Before performing any type of upgrade, you must backup your entire website files and database. If you are on Digital Ocean, you can easily do this by creating a snapshot of your droplet.

1. Open the sources.list file and change any reference of "stretch" to "buster"

sudo nano /etc/apt/sources.list
deb http://deb.debian.org/debian debian buster main 
deb http://deb.debian.org/debian buster-updates main 
deb http://deb.debian.org/debian buster/updates main

There may be several packages listed here. Make sure to change all of them. When you are done, save the file by pressing Ctrl + X and Y to save.

2. Navigate to the php.ini file contained in your PHP folder and replace any reference of "stretch" to "buster", as you did above.

/etc/php/8.1/apache2/php.ini

3. Perform the following commands in order to upgrade:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo reboot

The last command will disconnect you from the server. Relaunch Putty and log back in.

4. Verify that the upgrade has completed by running the following command:

hostnamectl

Confirm that your distribution now shows as "Debian GNU/Linux 10 (buster)"

5. Remove outdated packages by performing the following command:

sudo apt --purge autoremove

That's it! Everything should now be working with the upgraded distro.