Prerequisite for this tutorial:

OS: CentOS 8

Before you begin

Read these instructions carefully from start to finish. Make sure that you understand each step before starting the upgrade. 

Setup and configuration:

PostgreSQL host: 127.0.0.1
PostgreSQL port: 5432
PostgreSQL user: postgres
PostgreSQL password: __YOUR_INTERNAL_PASSWORD__
Newired Portal: 21.0.1
Newired Portal path: /opt/Newired
Newired license file: /opt/Newired/tomcat/conf/newired.license
HTTP port (tomcat internal service): 8090
Newired default language: en_US
Newired Portal URL address: http://__YOUR_SERVER__


Steps:

Stop the Newired service

sudo systemctl stop newired

Check the Newired service stop

sudo systemctl status newired

Output:

 

Create a backup folder and backup application files:

sudo mkdir -p /opt/Newired-backup/
sudo cp -r /opt/Newired /opt/Newired-backup/

Create SQL dumps of the production data and delete production databases:

sudo pg_dump -C -h 127.0.0.1 -p 5432 -U postgres -W -d newired -f /opt/Newired-backup/newired.sql
sudo pg_dump -C -h 127.0.0.1 -p 5432 -U postgres -W -d collector -f /opt/Newired-backup/collector.sql
sudo pg_dump -C -h 127.0.0.1 -p 5432 -U postgres -W -d report -f /opt/Newired-backup/report.sql
sudo psql -h 127.0.0.1 -U postgres -W -c "DROP DATABASE newired;" -c "DROP DATABASE collector;" -c "DROP DATABASE report;"

Uninstall the 21.0.1 version of Newired and remove its installation folder

sudo /opt/Newired/uninstall

The uninstaller will ask for your confirmation, press "enter":

Then remove installation Newired folder:

sudo rm -rf /opt/Newired

Download Newired Portal 21.1.0 and SQL update scripts from https://download.newired.com
And save files to /opt/ on your server:

/opt/Newired-Portal-21_1_0-rhlinux.sh
/opt/newired-sql-updates-21_1_0.zip

Allow the execution of the .SH file with the following command:

sudo chmod +x /opt/Newired-Portal-21_1_0-rhlinux.sh

Start the installation:

sudo /opt/Newired-Portal-21_1_0-rhlinux.sh -c

The installation will start, and you will be now guided through the installer:

Read guidance and press "enter" to continue.

Accept agreements by writing "1" and pressing "enter" to confirm:

Press enter to continue with the default value in brackets, or write and confirm a different path:

Press "enter" to continue with the default value in brackets or select a different path if you did not delete Newired directory:

Press "enter" to continue with the default value in brackets or select a different path if you did not delete Newired directory:

Choose features by writing numbers of them separated by comma, or press "enter" to continue with default selection in brackets:

If you want to create symlinks, press enter, otherwise write "n" and confirm with enter:

Press "enter" to continue with default value in brackets or write path and confirm with "enter":

Press "enter" to continue with default value in brackets or write a port number and confirm with "enter":

Press "enter" to continue with default value in brackets or write a port number and confirm with "enter":

Write path to license file and press "enter" to confirm or press "enter" to continue with default value in brackets:

Write domain name and press "enter" to confirm  or press "enter" to continue with default value in brackets:

Write path and press "enter" to confirm or press "enter" to continue with default value in brackets:

Write url and press "enter" to confirm or press "enter" to continue with default value in brackets:

Write name and press "enter" to confirm or press "enter" to continue with default value in brackets:

Write port number and press "enter" to confirm or press "enter" to continue with default value in brackets:

Write password and press "enter" to confirm or press "enter" to continue with default value in brackets:

Write file storage URL and press "enter" to confirm or press "enter" to continue with default value in brackets:

Write file storage port and press "enter" to confirm or press "enter" to continue with default value in brackets:

Write file storage user name and press "enter" to confirm or press "enter" to continue with default value in brackets:

Write file storage password and press "enter" to confirm or press "enter" to continue with default value in brackets:

Select your default language. This language will be used as default when creating a new journey. Write number of language and press "enter" to confirm or press "enter" to continue with default value (EN english US):

Installation will proceed:

We will stop the Newired service as soon as the installation process has finished

sudo systemctl stop newired

Check that Newired service stops  

sudo systemctl status newired
Output:

Remove the production databases of just installed Newired 21.1.0

sudo psql -h 127.0.0.1 -U postgres -W -c "DROP DATABASE newired;" -c "DROP DATABASE collector;" -c "DROP DATABASE report;"

Import procedure for the databases that we backed up at the beginning of the upgrade process (SQL files includes creating newired, collector and report databases)

sudo psql -h 127.0.0.1 -U postgres -W < /opt/Newired-backup/newired.sql

sudo psql -h 127.0.0.1 -U postgres -W < /opt/Newired-backup/collector.sql
sudo psql -h 127.0.0.1 -U postgres -W < /opt/Newired-backup/report.sql

Run the SQL scripts to update the database from 21.0.1 to 21.1.0

sudo psql -h 127.0.0.1 -U postgres -W -d newired < /opt/newired-sql-updates-21_1_0/database_update21.0.0_to_21.1.0_newired.sql

Note: If you have an older version of the portal, it is necessary to run SQL scripts of older versions. SQL files of previous versions can be found at https://download.newired.com


Copy the tomcat configuration from the previous installation

yes | sudo cp -rf /opt/Newired-backup/Newired/tomcat/conf/* /opt/Newired/tomcat/conf/

Copy files from the Delivery server from the previous installation

sudo cp -rf /opt/Newired-backup/Newired/content/* /opt/Newired/content/

Check folders /opt/Newired-backup/Newired/plugins and /opt/Newired-backup/Newired/themes
Copy if there are other plugins and themes than default to /opt/Newired/plugins and /opt/Newired/themes
Default Plugins and Themes must be new from version 21.1.0


Start the Newired service

sudo systemctl start newired

Check that Newired service started

sudo systemctl status newired

Output: