Prerequisite for this tutorial:
OS: Rocky, RedHat Enterprise
Before you begin
Read these instructions carefully from start to finish. Make sure that you understand each step before starting the upgrade.
Download following installation and update files from https://download.newired.com/ into the server, where is Newired installed:
- installation file (newired-portal-X_Y_Z-rhlinux.sh)
- update files (newired-sql-updates-X_Y_X.zip) - Only for versions before 23.2.
Setup and configuration:
PostgreSQL host: 127.0.0.1
PostgreSQL port: 5432
PostgreSQL user: postgres
PostgreSQL password: __YOUR_INTERNAL_PASSWORD__
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:
(pictures might differ in each version of Newired)
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 /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 your current 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 desired version Newired Portal and SQL update scripts from https://download.newired.com
And save files to /opt/ on your server:
Since version 23.2.0 and later there is no SQL script for database update (database_updateX.X.X_to_Y.Y.Y_newired.sql).
/opt/Newired-Portal-X_Y_Z-rhlinux.sh
/opt/newired-sql-updates-X_Y_Z.zip
Allow the execution of the .SH file with the following command:
sudo chmod +x /opt/Newired-Portal-X_Y_Z-rhlinux.sh
Start the installation:
sudo /opt/Newired-Portal-X_Y_Z-rhlinux.sh -c
The installation will start and you will be now guided trough 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:
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 Portal
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 |
You can skip next 3 steps if you are upgrading to 23.2.0 or later version:
Run gradually all the SQL scripts to update the database from previous version to installed one.
Please be aware that if the downloaded zip package does not contain any collector.sql files, there is no need to execute them.
sudo psql -h 127.0.0.1 -U postgres -W -d newired < /opt/newired-sql-updates-X_X_X/database_updateY.Y.Y_to_X.X.X_newired.sql
sudo psql -h 127.0.0.1 -U postgres -W -d report < /opt/newired-sql-updates-X_X_X/database_updateY.Y.Y_to_X.X.X_report.sql
sudo psql -h 127.0.0.1 -U postgres -W -d collector < /opt/newired-sql-updates-X_X_X/database_updateY.Y.Y_to_X.X.X_collector.sql
Note: It is necessary to run all SQL scripts in order from oldest to newest version . 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 the uploaded media files from previous installation
sudo cp -r /opt/Newired-backup/Newired/data/minio/media/uploaded/. /opt/Newired/data/minio/media/uploaded/
Copy the screenshots data from the previous installation, exclude folder with name "175" (from version 21.1.0 and upwards)
sudo mkdir -p /opt/Newired-backup/175-backup
sudo cp -r /opt/Newired/data/minio/screenshot/175/. /opt/Newired-backup/175-backup/
sudo cp -r /opt/Newired-backup/Newired/data/minio/screenshot/. /opt/Newired/data/minio/screenshot/
sudo rm -rf /opt/Newired/data/minio/screenshot/175/
sudo mv /opt/Newired-backup/175-backup/ /opt/Newired/data/minio/screenshot/175
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 you have your custom plugins and themes other than default to /opt/Newired/plugins and /opt/Newired/themesDefault Plugins and Themes must be new from version installed version.
If you are updating from previous versions to version 22.2.0 and above (only if you are updating from version below 22.2.0), your currently published content will not work, since there has been added protection of content delivery and object storage. Now you have 2 options:
- Publish new version
- Disable protection via properties
newired.contentDelivery.protection.enabled=false
newired.objectStorage.protection.enabled=false
Eventually, in some versions, there are changes in configuration of application (properties). Those changes depend on version of installed Portal. Those changes are not automatically updated and must be updated manually. Following table will show what changes are made in each version and how to proceed to apply those changes.
Version of Newired | Change | How to apply |
---|---|---|
23.3 | newired.syncTarget | Remove key from tomcat/conf/collector.properties |
newired.collectorUrl=http://localhost:8090/collector | Add key into tomcat/conf/report.properties | |
23.0 | newired.appsPath=c\:\\Newired\\apps | Add key into tomcat/conf/newired.properties |
21.2 | newired.objectStorageUrl=http://localhost:8090/newired/storage | Add key into tomcat/conf/newired.properties |
21.0 | newired.versionExportTemplatesPath=c\:\\Newired\\templates newired.storage.access.key=objectstorageadmin newired.storage.access.secret=objectstorageadmin newired.storage.url=http://localhost:9000 newired.screenshots.enabled=true | Add key into tomcat/conf/newired.properties |
20.1 | newired.defaultRuntimeOverlayLanguage=en_US | Add key into tomcat/conf/newired.properties |
20.0 | spring.mail.host=<insert value here> spring.mail.port=<insert value here> spring.mail.username=<insert value here> spring.mail.password=<insert value here> spring.mail.properties.mail.smtp.auth=false spring.mail.properties.mail.smtp.starttls.enable=false | Copy SMTP settings from configuration 19.3 file Newired_backup/Newired/tomcat/webapps/newired/WEB-INF/classes/application.properties into tomcat/conf/newired.properties |
Note: If you are upgrading trough more versions, each of version changes must be applied.
Start the Newired service
sudo systemctl start newired |
Check that Newired service started
sudo systemctl status newired |
Output:
If you have problems installing older versions than is the latest one, try to look into older articles for upgrade between each version.