How to update the Ubuntu distribution on the CPM instance

How to update the Ubuntu distribution on the CPM instance

Before starting it is recommended to take backup of cpmdata volume and be familiar with how to restore the server.


In order to update the Ubuntu distribution on the CPM instance, you have to follow these instructions precisely (when no backup/DR is running):


1) Connect with SSH (using the user "cpmuser" and your private key).

 

2) Type:

sudo apt-get update

sudo apt-get dist-upgrade

 

3) Stay with the default (simply click "enter")  to any command line prompt question you get - very important!

If you do not accept the default answers, or use wrong apt-get commands, MySQL may stop functioning:

If this happened, to get back up and running, please follow the "upgrade" instructions in chapter 1.4 "Upgrading N2WS" in our User Guide at https://docs.n2ws.com/user-guide/#1-4-upgrading-n-2-ws


4) The update process may create the /etc/mysql/debian.cnf file, which contains a clear text password for the user "debian-sys-maint".
We recommend to change this password and delete this file after the update:
mysql -u debian-sys-maint -p%oldpassword%
(replace %oldpassword% with the password listed in /etc/mysql/debian.cnf)

SET PASSWORD = PASSWORD('%newpassword%');
(replace %newpassword% with the  new password)

exit
(to exit from MySQL)

sudo rm /etc/mysql/debian.cnf
Now the password is no longer the default one, and it's not contained in clear text form anywhere.


5) At the end reboot the instance via the EC2 console or by using the command:
sudo reboot






    • Related Articles

    • How to upgrade an N2WS server from Ubuntu 22.04 to Ubuntu Pro

      Before starting, make sure you know how to redeploy the server in case of issues during OS upgrade. In addition, Linux knowledge is Required. There are additional costs charged by AWS when using Ubuntu Pro, see this link for pricing details. Warning: ...
    • How to upgrade CPM using a patch

      Please note: upgrading using patch does not upgrade Apache/OS Upgrade Diagram General 1. It is recommended to deploy the patch when you have no active backup policies, DR or recovery running. as it will restart Apache and require few min downtime. 2. ...
    • Upgrade instructions

      This guide outlines the steps required to upgrade N2WS Backup & Recovery. We strongly recommend that you follow every step contained within this guide to ensure is done correctly and no data loss occurs. in addition to this article, we recommend that ...
    • Release notes for the latest v2.6.x CPM release

      In order to upgrade to v2.6.x from any version, please use the AMI upgrade method . The upgrade instructions are in the chapter 1.3.5 "Upgrading the N2WS Server Instance" at https://n2ws.com/support/documentation/introduction-to-cpm#13 In order to ...
    • After recovering a Linux instance "PasswordAuthentication" in the /etc/ssh/sshd_config file changes from "Yes" to "No"

      After recovering a Linux instance "PasswordAuthentication" in the /etc/ssh/sshd.config file changes from "Yes" to "No". In order to provide secure access to launched instances, AWS alters a single directive in the /etc/ssh/sshd_config at launch. AWS ...