Install Collectors < 4.12 on Windows

1. Prerequisites

1.1. Java 8

Download OpenJDK Windows x64 :  

Install Java by following the installation wizard

You can check your current java installation by opening cmd.exe  and run the following commands:

1 java -version

1.2. Code editor

In order to edit JSON and XML configuration file, a code editor is more than recommended

1.3. Collectors java archive

1.4. NSSM Service manager

2. First start

  • Create an empty folder for all PEPITe related files (e.g. C:\PEPITe).

  • Move the java archive dataserver-core-<version>-jar-with-dependencies.jar to the PEPITe folder.

  • Create an empty folder for the new Collectors installation (e.g. C:\PEPITe\dataserver ).

  • In the Collectors folder create a dataserver.cmd file with the following start up command :

1 java -Dds.home=C:\PEPITe\dataserver -jar C:\PEPITe\dataserver-core-<version>-jar-with-dependencies.jar

(Edit the paths in the command above if you have created the folders elsewhere)

(replace <version> by your version ; e.g. 4.10.7 )

You should see the Collectors web interface.

3. Install as service

  • Stop currently running instance of dataserver by closing the terminal windows

  • Start cmd.exe as Administrator and navigate to the nssm.exe folder

1 cd C:\PEPITe\tools\nssm-2.24\nssm-2.24\win64\

(The path above can change depending on where nssm is extracted )

  • Run the following command :

1 nssm.exe install dataserver

(you can replace dataserver by another name)

A new window should appear on the screen. 

  • Enter the path of the dataserver.cmd file under the field Path

  • The default user is Local System (a predefined local account). If you want to use a specific user for the service, specify the credentials under Log on tab.

  • Then click Install service


4. Manage the Collectors service

You can access the Service Manager by typing “service” in the windows search tool. From here you can start, restart, stop, pause the Collectors service.

Start the Collectors and browse http://localhost:8180/web/index.html to access the web interface.

5. (OPT) Multiple Collectors Configuration

5.1 Create the dataserver.cmd for every Collectors

  • In your PEPITe folder, create a folder per Collectors instance (e.g. C:\PEPITe\dataserver01, C:\PEPITe\dataserver02, …)

  • In each folder, create a dataserver.cmd (eg : dataserver01.cmd, dataserver02.cmd, …) file with the following content :

1 java -Dds.home=C:\PEPITe\dataserver01 -jar C:\PEPITe\dataserver.jar http://localhost:8180

(Each -Dds.home value should be edited accordingly e.g. C:\PEPITe\dataserver01, C:\PEPITe\dataserver02)

(Each file should use a different port e.g. 8181, 8182, ...)

The symlink called dataserver.jar needs to be created in the followings two cases :

  1. This is the first Collectors you install and there will be others. No symlink already exists.

  2. You are updating the Collectors version. In that case, you should delete the old one before proceeding. del dataserver.jar

  • Open a terminal as Administrator and navigate to the folder containing the java archive dataserver-core-<version>-jar-with-dependencies.jar (e.g. C:\PEPITe )

  • Run the following command :

1 mklink dataserver.jar dataserver-core-<version>-jar-with-dependencies.jar

(replace <version> by your dataserver version e.g. 4.10.7 )

This will create a symbolic link to the java program.

Notes : When the dataserver-core-<version>-jar-with-dependencies.jar version will be replaced by a new one, this link will need to be recreated to point to the new version. However, all the dataserver.cmd can remain unchanged as they all use the symlink.

5.3 Install as a service

  • Follow the steps described in 3. and :

    • Use different name for every service (dataserver01, dataserver02, …) in nssm.

    • Use the correct path to the start up command file (C:\PEPITe\dataserver01\dataserver01.cmd, C:\PEPITe\dataserver02\dataserver02.cmd)