Disclaimer

Please note that this guide is provided as-is, and we do not offer support for the upgrade process. Proceed at your own risk.

 

Upgrading your Ubuntu server from 22.04 to 24.04 ensures you get the latest features, security updates, and improvements. This guide outlines the steps to upgrade your Enhance servers successfully, along with important checks and tips.

Step 1: Take a Full Backup

Before you start, take a full backup of your system. The best way to do this is by creating a snapshot of your server. This ensures that you can restore your system to its previous state if anything goes wrong during the upgrade.

Step 2: Uninstall cPFence Security Software

Before starting the upgrade, uninstall the cPFence security software to avoid conflicts:

cpfence --uninstall

Next, ensure your system’s package manager is in a healthy state:

apt --fix-broken install

Step 3: Update Your System

Update your system’s package list and upgrade all packages:

sudo apt list --upgradable
sudo apt update && sudo apt upgrade -y
reboot

Rebooting ensures that all the updated packages are loaded correctly.

Step 4: Prepare for Stability During the Upgrade

To ensure stability during the upgrade, especially over SSH, open an additional SSH port:

sudo ufw allow 1022/tcp

Step 5: Install the Upgrade Tool

Ensure all necessary tools for the upgrade are installed:

sudo apt install update-manager-core

Step 6: Start the Upgrade Process

Begin the upgrade process with the following command:

sudo do-release-upgrade -d

If your server uses third-party mirrors, you might need to include the --allow-third-party flag:

sudo do-release-upgrade -d --allow-third-party

Step 7: Post-Upgrade Cleanup

After the upgrade, you’ll be prompted to remove old packages. You can choose to do this immediately by selecting “Y” or postpone it for later.

Step 8: Reboot

Reboot your server to apply all changes:

reboot

Step 9: Post-Upgrade Adjustments

1. Check and Update Source Lists

After the upgrade, check the enhance.list and docker.list files:

  • If enhance.list has been renamed to enhance.list.distUpgrade, rename it back.
  • Do the same for docker.list.

In both files, replace any occurrences of jammy with noble:

sudo sed -i 's/jammy/noble/g' /etc/apt/sources.list.d/enhance.list
sudo sed -i 's/jammy/noble/g' /etc/apt/sources.list.d/docker.list

Then, update and upgrade your packages:

sudo apt update && sudo apt upgrade

2. Fix PHP Websites

If you encounter issues with PHP websites not working after the upgrade, reinstall the necessary PHP packages:

sudo apt install --reinstall appcd ecp-php{56,70,71,72,73,74,80,81,82,83}

Finally, reboot the server:

reboot

Step 10: Reinstall cPFence

After the upgrade, reinstall cPFence to ensure your server is protected:

bash <( curl -ks https://api.cpfence.app/install.sh) -k cPFence-your-license-key

Conclusion

Upgrading from Ubuntu 22.04 to 24.04 can be smooth if you follow these steps carefully. Always remember to back up your server before starting the upgrade. If any issues arise, you’ll have the peace of mind knowing that you can restore your server to its previous state.

 

Happy upgrading!

No comment

Leave a Reply

Your email address will not be published. Required fields are marked *