Installation with Windows Services

Prerequisites

Identity Provider

The MOPS 4.0 system is installed with a built-in identity provider that can be used to authenticate users. However, if you want to use an external identity provider such as Microsoft Entra ID (formerly Azure AD) or Active Directory Federation Services (AD FS), you need to configure it before it can be used in MOPS 4.0.

The installation of MOPS 4.0 can be completed without an external identity provider, but it is recommended to set up an identity provider for production systems since using an existing identity provider will reduce administration.

Service Account

MOPS 4.0 requires an account with read and write permissions to the directories for MOPS 4.0 that lie under Program Files and ProgramData. A typical installation is located on a separate drive from the system drive. Setting permissions for the entire separate drive is sufficient.

The Service Account needs to have Read & execute, List folder contents, Read and Write permissions for the location of the MOPS 4.0 installation.

Disk permissions

vcredist_x64

MOPS 4.0 requires vcredist_x64 to run the application. Please install vcredist_x64 using the installer for the version of MOPS 4.0 you’re installing, if no vcredist_x64 installer exist use the latest previous MOPS 4.0 version.

Node.js

MOPS 4.0 requires Node.js to run the application. Please install Node.js using the installer for the version of MOPS 4.0 you’re installing, if no Node.js installer exist use the latest previous MOPS 4.0 version.

Java

Keycloak requires a Java runtime in order to function. Install OpenJDK 21 using the included installer.

It is vital to make sure that the JAVA_HOME variable is set during the OpenJDK installer.

OpenJDK 21 Installation

Python

MOPS 4.0 requires Python to run the application. Please install Python using the installer for the version of MOPS 4.0 you’re installing, if no Python installer exist use the latest previous MOPS 4.0 version.

When running the Python installer, please follow these steps:

  • select Use admin priveliges when installing py.exe and choose Customize installation
  • on Optional Features, make sure to select all options
  • on Advanced Options, make sure to have the following selected:
    • Install Python for all users
    • Associate files with Python
    • Add Python to environment variables
    • Precompile standard library
  • on Setup was successful, select Disable path length limit

Python Packages

For the Python applications of MOPS 4.0, there are python-packages needed for these applications to run. To install these, unzip the python_packages.zip that comes with the installation and if no zip file exists then use the latest previous MOPS 4.0 version that comes with a Python installer.

It is important that the zip file that is being extracted comes from the same installation kit as the Python installer that is being installed.

When installing the Python packages, please follow these steps:

  • Unzip python_packages.zip
  • open an elevated (Administrator) PowerShell in the unzipped folder
  • run .\install_python_packages.ps1

This installation will make sure that all Python packages are installed without requiring any Internet connection.

Installing PostgreSQL

MOPS 4.0 requires a PostgreSQL database to store data. Please install PostgreSQL using the installer for the version of MOPS 4.0 you’re installing, if no PostgreSQL installer exist use the latest previous MOPS 4.0 version.

If the database for MOPS 4.0 should be installed on another server, then skip the PostgreSQL Server component in the installer and refer to separate instructions for those kinds of installations. The utilities from the installer are still needed for the installation of MOPS 4.0 to work.

When running the installer, make sure to select only the following components:

  • PostgreSQL Server
  • pgAdmin 4
  • Command Line Tools

Then update system PATH to use PostgreSQL commands:

  1. Open the Start menu and search for “environment variables”.
  2. Select Edit the system environment variables.
  3. In the System Properties dialog, click Environment Variables
  4. Under System variables, find and select Path, then click Edit.
  5. Click New and add the full path to the PostgreSQL bin directory (e.g. C:\Program Files\PostgreSQL\17\bin).
  6. Click OK to save.

This can also be done using Powershell with:

$env:PATH = $env:PATH + ";C:\Program Files\PostgreSQL\17\bin"

If the database has been installed separately, the default configuration does not allow for remote connections. These settings can be changed in postgresql.conf and pg_hba.conf. Both of these files can be found in the data directory of the PostgreSQL installation, e.g. C:/Program Files/PostgreSQL/17/data.

In postgresql.conf, edit the line containing listen_addresses to be listen_addresses='*'. In pg_hba.conf, make changes to allow for remote connections.

Here is one example for allowing all remote connections.

# Allow all
host    all             all        0.0.0.0/0               scram-sha-256
host    all             all        ::0/0                   scram-sha-256

These are very loose rules and should be hardened to only allow connections from the server hosting MOPS 4.0. Check out the PostgreSQL documentation for detailed instructions.

Verify with pgAdmin or any other database tool that the database is reachable from the same machine as the installation will be run from.

These are very loose rules for remote connections and could be hardened by only allowing database connections from the server hosting MOPS 4.0. Restarting the Postgres service is required after saving these changes.

Installing Mosquitto

The event broker for MOPS 4.0 is the standalone version of Mosquitto. Use the installer included for installing Mosquitto.

When running the installer for Mosquitto, it is vital ensure that the Service component is selected. It is recommended to install Mosquitto in the same Program Files directory as MOPS 4.0.

Take note of where Mosquitto was installed since some configuration of it will be required later.

Installing MOPS 4.0

Instruction for installing the core MOPS 4.0 can be found in the MOPS 4.0 Windows Service Installation manual.

Installing MOPS 4.0 Condition Monitoring System (CMS)

The CMS is an optional module that can be installed during the installation of MOPS 4.0 by selecting Custom and then select the CMS feature and add it to be installed.

MOPS 4.0 Setup

Installing MOPS 4.0 Excel Add-In

The Excel is an optional module that can be installed during the installation of MOPS 4.0 by selecting Custom and then select the MOPS 4.0 Excel Add-In feature and add it to be installed.

To continue with the installation of the Excel Add-In, use the following manual MOPS 4.0 Excel Add-In Installation.

MOPS 4.0 Setup