meta data for this page
Guide upgrade Linux EN
Source : install/Guide_upgrade Linux_EN.pdf
N4V Update Guide(Linux REDHAT/DEBIAN)
Rev. (Y-M-D): 2026-09-30
Need4viz.com
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 1
Table of Contents
1. PREREQUISITE ……………………………………………………………………………………………………………………………. 2 1.1. Retrieving the archive Patch ……………………………………………………………………………………………………………. 2 1.2. Stopping the N4V instance ……………………………………………………………………………………………………………… 2 1.3. Saving the settings of the existing instance ………………………………………………………………………………………… 2 2. MANUALLY UPDATING N4V FOR WEBI ……………………………………………………………………………………………. 4 2.1 Updating the N4VCustomElements webapp ………………………………………………………………………………………… 4 2.2 Updating the N4VDashboardBuilder webapp ……………………………………………………………………………………….. 4 2.3 Engine update ……………………………………………………………………………………………………………………………… 4 2.3.1 Deploying files ……………………………………………………………………………………………………………………………… 4 2.3.2 Updating the license key ……………………………………………………………………………………………………………….. 4 2.3.3 Configuring the config.js file …………………………………………………………………………………………………………… 5 2.3.4 Configuring the config_charts.js file ............................................................................................................... 5 2.3.5 Copy other resource files ………………………………………………………………………………………………………………. 6 3 UPDATING YOUR NODE VERSION …………………………………………………………………………………………………….. 7 3.1 NodeJS version …………………………………………………………………………………………………………………………….. 7 3.2 NodeJS upgrade …………………………………………………………………………………………………………………………… 7 3.2.1 With NVM……………………………………………………………………………………………………………………………………. 7 3.2.2 Without NVM (standalone Node installation) ……………………………………………………………………………………….. 7 3.2.3 Stop and Kill N4V services ………………………………………………………………………………………………………………. 8 3.2.4 Update the script and Start N4V services …………………………………………………………………………………………… 8 4 UPDATING N4V FOR WEBI USING CONFIGURATION SCRIPT ……………………………………………………………….. 9 4.1 Configure the update …………………………………………………………………………………………………………………….. 9 4.2 Install the update …………………………………………………………………………………………………………………………. 9 5 LAUNCH OF N4V FOR WEBI SERVICES …………………………………………………………………………………………….. 10 5.1 Starting services under PM2 ………………………………………………………………………………………………………….. 10 5.2 Verifying the launch of services ……………………………………………………………………………………………………… 10 5.3 Verification of the proper functioning of the services …………………………………………………………………………… 11 6 SUPPORT ……………………………………………………………………………………………………………………………………… 12
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 2
1. Prerequisite
In this upgrade process under Linux, the following will be considered: • A specific user account (named need4viz in this document) used to initially install the component will be used for the upgrade. This user will have the extended rights on the system (super user) • The NodeJS instance hosting N4V is operational. • The web application server (Apache or Tomcat type) hosting the N4V webapp is operational
1.1. RETRIEVING THE ARCHIVE PATCH Log in to the Need4Viz support site and download the Linux Patch archive. Connect to the system hosting the N4V server under the need4viz account. Rename the zip archive to gz archive via the following command : mv N4V_LIN_<version>.tar.zip N4V_LIN_<version>.tar.gz
Unzip and descale the archive in an empty temporary folder. Two folders in the archive are to be considered for the update: • N4VCustomElements: contains the update of the N4V webapp • Nodejs: contains the update of the engine and N4V configuration The following command can be used after moving the archive to the target folder: tar -xvf N4V_LIN_<version>.tar.gz
1.2. STOPPING THE N4V INSTANCE
This step can be skipped for an update using a configuration script. Verify that N4V services are operational by running the command pm2 list Node services are normally in the “running” state. Stop them by running the command pm2 stop all All N4V services must then enter the “stopped” state
1.3. SAVING THE SETTINGS OF THE EXISTING INSTANCE
This step can be skipped for an update using a configuration script. The engine update will impact a number of settings files that may have been modified previously. In order not to lose these changes and to be able to postpone them after the update, you must back up these files by following these steps:
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 3
- Create a backup folder specific to the current version under the home of the need4viz account (e.g. /home/need4viz/bkp_v2021.12.4) - Copy the following files to this folder: o /home/need4viz/.nvm/versions/node/v20.18.1/lib/node_modules/custom_element/ce_libs/config.js o /home/need4viz/.nvm/versions/node/v20.18.1/lib/node_modules/custom_element/ce_libs/key.js (if N4V version is prior 2026.3) o /home/need4viz/.nvm/versions/node/v20.18.1/lib/node_modules/custom_element/ce_libs/n4v.lic (starting with N4V 2026.3 version) o /home/need4viz/.nvm/versions/node/v20.18.1/lib/node_modules/custom_element/ce_libs/config_charts.js
- If they have been modified beforehand (creation of custom palettes, custom maps...), copy the following files to this folder (if necessary, create a subfolder for each lang and copy to lang_EN and lang_FR): o /home/need4viz/.nvm/versions/node/v20.18.1/lib/node_modules/custom_element/ce_libs/resources/* o /home/need4viz/.nvm/versions/node/v20.18.1/lib/node_modules/custom_element/ce_settings/lang_FR/*.json o /home/need4viz/.nvm/versions/node/v20.18.1/lib/node_modules/custom_element/ce_settings/lang_EN/*.json
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 4
2. Manually updating N4V for Webi
Once the prerequisites have been completed and validated, the N4V for Webi update can begin. 2.1 UPDATING THE N4VCUSTOMELEMENTS WEBAPP Update the contents of the N4VCustomElements webapp in the target folder of the application server (Tomcat or Apache for example). As part of a deployment on tomcat for example the following command to be taken over (by adapting the folder names) sudo cp -r /home/need4viz/Need4Viz_patch_<version>/N4VCustomElements/* /data/bobi42/sap_bobj/tomcat/webapps/N4VCustomElements
2.2 UPDATING THE N4VDASHBOARDBUILDER WEBAPP Update the contents of the N4VDashboardBuilder webapp in the target folder of the application server (Tomcat or Apache for example but to get the full features of the N4V Dashboard Builder, Tomcat deployment is recommended for the N4V Dashboard Builder). As part of a deployment on tomcat for example the following command to be taken over (by adapting the folder names) sudo cp -r /home/need4viz/Need4Viz_patch_<version>/N4V DashboardBuilder/* /data/bobi42/sap_bobj/tomcat/webapps/ N4VDashboardBuilder
2.3 ENGINE UPDATE
2.3.1 Deploying files
Update the target custom_element folder via the following command: cp -r /home/need4viz/Need4Viz_patch_<version>/nodejs/node_modules/custom_element /home/need4viz/.nvm/versions/node/ v20.18.1/lib/node_modules/. Since 2025.1.9 version, all necessary modules are included in the release. Copy the full node_modules directories in your node_modules directory.
2.3.2 Updating the license key
For N4V version prior to 2026.3, resume the previously saved key.js file and move it back to the target folder • /home/need4viz/.nvm/versions/node/v20.18.1/lib/node_modules/custom_element/ce_libs Starting N4V version 2026.3, resume the previously saved n4v.lic file and move it back to the target folders • /home/need4viz/.nvm/versions/node/v20.18.1/lib/node_modules/custom_element/ce_libs
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 5
• /data/bobi42/sap_bobj/tomcat/webapps/N4VDashboardBuilder Since 2026.3.6 version, the n4v.lic key file is replacing the previous key.js file. You can download this new key file on the support site.
2.3.3 Configuring the config.js file
Depending on the update level, differences may appear in the application's main configuration file (config.js). Always update the new config file.js (in case of new settings) and never repeat the old version (unless the only differences are in the value of the parameters). Typically, if the version number at the top of the file is the same, you can overwrite the new version with the old one. If the version number has changed, you must manually update the parameter values in the new file from the values of the saved file. To check the differences between the saved version and the new version, run the command (by adapting the folder names): diff /home/need4viz/save_config/config.js /home/need4viz/.nvm/versions/node/ v20.18.1/lib/node_modules/custom_element/ce_libs/config.js In the updated config.js file, also update: - the parameter version_files_id with the numeric value of the target version (e.g. for N4V version 2022.0.1, set to 202201). This setting is used to force update N4V static files in users' browser cache. - The parameter SAPBI_ver with a value of 42 for using N4V on an SAPBI 4.2 version or 43 for use on an SAPBI 4.3 version
2.3.4 Configuring the config_charts.js file
Depending on the level of update, differences may appear in the application's secondary configuration file (config_chart.js). Always update the new config_chart.js file (in case of new settings) and never repeat the old version (unless the only differences are in the value of the parameters). Typically, if the version number at the top of the file is the same, you can overwrite the new version with the old one. If the version number has changed, you must manually update the parameter values in the new file from the values of the saved file. To check the differences between the saved version and the new version, run the command (by adapting the folder names): diff /home/need4viz/save_config/config _chart.js /home/need4viz/.nvm/versions/node/ v20.18.1/lib/node_modules/custom_element/ce_libs/config _cha rt.js As a reminder, the following elements are valid for each of the charts of the N4V suite: - Chart_name_activate: Enables or disables the chart in the list of graphical components of the Webi interface. Set to true to enable the chart, to false to disable it. - Chart_name_limit_lines: allows you to set a maximum number of rows as input accepted by the Need4Viz engine to generate the chart. Significantly increasing the number of rows max makes it possible to display graphs with more data but tends to reduce the performance of the browser (size of the graph too large). An internal Webi limit already
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 6
exists and is set at 50,000 lines (but the Webi rendering engine can however display an error – red cross – with a lower number of lines).
2.3.5 Copy other resource files
Unless otherwise specified in the Release Note of the target update version, the other backed up resource files (ce_libs/resources/* folder and ce_settings/lang_XX/_*.json) can be copied to the target folders.
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 7
3 Updating your Node version
3.1 NODEJS VERSION Since N4V 2025.1.9, the NodeJS v20 is supported (previous version supported was NodeJS v12).
You can continue to use NodeJS v12 with N4V (2025.1.9+) but it is recommanded to upgrade your NodeJS version to ensure a full support of your system (NodeJS v12 is not supported anymore by the community).
To update your NodeJS environment, you can follow the below steps. 3.2 NODEJS UPGRADE In this example, the initial installation of NodeJS is a v12.8.1 and the target version is v20.18.1. You can adapt this procedure for your initial/target environments.
Before any upgrade, please make a backup of your full /home/need4viz/.nvm/versions/node/v12.8.1/lib/ folder. 3.2.1 WITH NVM NVM is a version manager for Node to manage different Node installations on the same server. We can migrate by using NVM or we can stay on a standalone version of nodejs Run the following commands to install and select the 20.18.1 version of nodejs : nvm install 20.18.1 nvm use 20.18.1 If NVM is not installed, you can install it curl -o- https://raw.githubusercontent.com/nvm -sh/nvm/v0.35.3/install.sh | bash Close and log on again to run the following command to install Node v20.18.1: nvm install 20.18.1 3.2.2 WITHOUT NVM (STANDALONE NODE INSTALLATION) If you have an older version of node and don’t want to use NVM, you can follow these steps:
RedHat installation
sudo yum remove -y nodejs curl –silent --location https://rpm.nodesource.com/setup_20.x | bash sudo yum install -y nodejs
Debian installation
sudo apt-get remove -y nodejs
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 8
curl –silent --location https://deb.nodesource.com/setup_20.x | bash Apt-get install -y nodejs Now you can install the node modules provided in the N4V release in the node_modules folder of your Node v20 and continue the installation & configuration of N4V module.
3.2.3 STOP AND KILL N4V SERVICES Stop and kill all N4V servers to ensure a clean migration. If multiple Node.js servers are running, you can selectively stop and kill them.
Stopping and killing all servers:
pm2 stop all pm2 kill
Selectively Stop and Kill Servers:
pm2 list pm2 stop 1 2 3 4 5 6 | examples of ids pm2 kill 3.2.4 UPDATE THE SCRIPT AND START N4V SERVICES Once the migration or killing the previous N4V Services is done, you need to upgrade the script that launch the servers to reflect the new NodeJS version and start the server once again.
To update the script:
sed -i 's/v12.8.1/v20.18.1/g' apps_ce.json
Start All Node Servers using the updated apps_ce.json file.
pm2 start ./apps_ce.json
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 9
4 Updating N4V for Webi using configuration script
4.1 CONFIGURE THE UPDATE Complete the config.sh file before performing the update. Fill in the following fields: - MODE: ‘UPDATE’ - USER: Name of the specific user used to run/install N4V - PATCH_VERSION: Version of the patch located in N4V_LIN_<version> - BKP_VERSION: Version of the last installation or update - NODE_VERSION: Version of NodeJS (run 'nvm current' to find your version) - NODE_PATH: Path to the node_modules folder - NODECE_PATH: Path to the custom_element folder - WEBAPP_PATH: Path to the webapps folder in the web application. “/var/www/html” for Apache and “tomcat/webapps” for Tomcat - PM2_PATH: Path to pm2
4.2 INSTALL THE UPDATE Ensure that the config.sh file is in the same folder as script.sh. Run the update through the following command: sudo ./script.sh
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 10
5 Launch of N4V for Webi services
Once the update of the webapp and the engine is done, it remains to restart the N4V services via PM2: 5.1 STARTING SERVICES UNDER PM2
Run the pm2 start all command. The result must be:
5.2 VERIFYING THE LAUNCH OF SERVICES Once the services are launched, you can check their accessibility by opening a browser and going to the following URL for each of the 13 services: http://URLNodeJSServer:PORTNode_Maps/about with URLNodeJSServer and PORTNode_Maps referring to the variables configured in the config.js file. E.g. http://localhost:8201/about the result must be of the form:
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 11
Test the following 12 ports (PORTNode_Maps+1, PORTNode_Maps+2, ..., PORTNode_Maps+12) to verify that each service is up and running.
5.3 VERIFICATION OF THE PROPER FUNCTIONING OF THE SERVICES Connect to the BI LaunchPad and open or create a new Webi document
In Design view, navigate to Report Items / Custom Item; => Insert Custom Item
The service is visible in the report items window and displays the charts
The service works properly!
You will find on each graph, the information about the license key
The update is complete
Need4Viz update guide
Update Guide Linux (REDHAT/DEBIAN) 12
6 Support
Once your support account is created, you can access it via the URL https://www.need4viz.com/support/.
You can also contact support at [email protected]
The documentation for each chart is available at the following site: https://www.need4viz.com/dokuwiki/doku.php