3. Running DFM on any OS

DynFi Manager has two external dependencies. In order to make it run:

  • Java >= 11 has to be installed on the machine where DynFi Manager is supposed to run,

  • MongoDB >= 3.4 has to be available from the machine where DynFi Manager is supposed to run (can be the same, but can also be available over the network).

Please note that DynFi Manager is released for Debian and Ubuntu operating systems in a way which provides easy/automated updates (thanks to APT) and also systemd scripts. (See Installing DFM on Ubuntu.)

However, you can run DynFi Manager manually (or create your own “startup scripts”) in any OS as long as it meets dependencies listed above.

To download DynFi Manager’s dynfi-version.jar file, browse dynfi.com. Of course, instead of the version in the file name, there should be an actual version.

This single JAR file contains DynFi Manager’s server and DynFi Manager’s Web User Interface. Except Java >= 11 and MongoDB >= 3.4 nothing else should be needed to run DynFi Manager using this JAR file.

3.1. Installing Java

You can check if Java is installed using such command in terminal / command line interface:

java -version

If the version reported is 7 or below, you need to upgrade. If your operating system does not support any automated or tooled approach of installing Java, you can install free and open source OpenJDK from AdoptOpenJDK.

The successful check should result in similar output:

openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

As with any other tool, please keep it updated for latest bugfixes and security upgrades.

3.2. Installing MongoDB

To store data DynFi Manager uses MongoDB in version 3.4 or above.

If you are not sure if MongoDB is installed on your computer or which version it is, you can perform the following check in the terminal / command line interface:

mongo --eval "db.version()"

Make sure that the line MongoDB server version shows at least version 3.4. The output might look like this:

MongoDB shell version v3.4.6
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.6
3.4.6

If it turns out that your computer is not running MongoDB and you cannot access it on other machine(s) in your network (as DynFi Manager can also connect to MongoDB installed elsewhere), you can follow installation tutorial for the operating system of your choice from MongoDB.

3.3. Running DynFi Manager on Windows

Though not recommended, it is possible to run DynFi Manager on Windows.

In this example DynFi Manager is going to connect to local MongoDB (by default).

Install Java 11 (https://adoptium.net/temurin/archive/?version=11, choose Windows x64 JRE installer).

Install MongoDB (https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-windows/)

Thus, having both Java 11 and MongoDB installed on the machine, DynFi Manager can be started like this:

java -jar dynfi-version.jar

(Of course the actual file name should be used instead of dynfi-version.jar file as above.)

This should start DynFi Manager and bind it to all IP addresses available, especially 127.0.0.1. The output should be similar to the image below (after the custom SSL certificate is accepted):

_images/windows_05.png

Running DynFi Manager on Windows

As seen in the image, due to lack of default log directory, DynFi Manager prints all logs to standard output. This can be easily changed be creating a (sub)directory for DynFi Manager to write its logs:

mkdir logs

Before starting again, an environment variable can also be set to configure DynFi Manager not to use HTTPS, like this:

SET useHttps=false

When starting again, one can specify the newly created logs (sub)directory as the directory where DynFi Manager should write its logs (instead of the console):

java -DLOG_DIR=logs -jar dynfi-version.jar

This way DynFi Manager’s GUI can be accessed using e.g. http://127.0.0.1:9090 from the same machine and instead of printing logs to console, will write them to logs/dynfi.log, as shown below.

_images/windows_06.png

Running DynFi Manager on Windows

To run DynFi Manager with custom configuration, create a dynfi.conf file (e.g. in c:\dynfi\config\) and use --config option, e.g:

java -DLOG_DIR=logs -jar dynfi-version.jar --config c:\dynfi\config\dynfi.conf

Example of simple dynfi.conf:

ipAndPort=localhost:9090
useHttps=false
mongoClientUri=mongodb://localhost

Of course, various options can be written to config file, as described in DFM Configuration chapter. For tuning logs, refer to DFM Logs.

3.4. Running DynFi Manager on FreeBSD

The following example shows how to quickly run DynFi Manager on FreeBSD 11.

In this example DynFi Manager is going to connect to remote MongoDB running on host 192.168.10.64.

To install Java 11 on FreeBSD, please follow FreeBSD Documentation. To install OpenJDK11, one should basically call in terminal:

sudo pkg install openjdk11

And follow the procedure.

In case MongoDB should be installed locally, this is possible with:

sudo pkg install mongodb34
sudo echo mongod_enable=\"YES\" >> /etc/rc.conf
sudo service mongod start

If Java 11 is installed and recent dynfi.jar file is downloaded to current directory, DynFi Manager can be started like this (it should connect to MongoDB on localhost):

java -jar dynfi-version.jar

(Of course the actual file name should be used instead of dynfi-version.jar file as above.)

This should start DynFi Manager and bind it to all IP addresses available, especially 127.0.0.1. The output should be similar to the image below (after accepting custom certificate with security exception).

_images/freebsd_no_default_log_dir.png

Running DynFi Manager on FreeBSD 11.1 without default log directory

As seen in the image, due to lack of default log directory, DynFi Manager prints all logs to standard output. This can be easily changed by creating the default directory for DynFi Manager to write its logs:

mkdir /var/log/dynfi

When starting again, one can also specify precise IP address (192.168.10.50 in this very example) and port (443, default for HTTPS) DynFi Manager should bind to. This way DynFi Manager can be started using:

ipAndPort=192.168.10.50:443 java -jar dynfi-version.jar

This way DynFi Manager’s Web User Interface can be accessed using https://192.168.10.50 address in browser and instead of printing logs to standard output, will write them to /var/log/dynfi/dynfi.log, as shown below.

_images/freebsd_default_log_dir_custom_ip.png

Running DynFi Manager on FreeBSD 11.1 bound to one IP address

If MongoDB is not available on localhost and cannot be installed on localhost (due to whatever reason), it has to be available somewhere in the network. Then mongoClientUri can be used to configure DynFi Manager so it will connect to remote MongoDB, installed on 192.168.10.64 in this very example:

mongoClientUri=mongodb://192.168.10.64 java -jar dynfi-version.jar
_images/freebsd_remote_mongo.png

Running DynFi Manager on FreeBSD 11.1 with MongoDB installed remotely

Of course, various options can be written to config file, as described in DFM Configuration chapter. For tuning logs, refer to DFM Logs.

3.5. Upgrading DynFi Manager for manual use

If you are running DynFi Manager manually, using a file which has been downloaded from http://dynfi.com and DynFi Manager shows the message that there is a new version of DynFi Manager available, the upgrade procedure is very simple. The whole task is to download a new file and run it exactly the same way as previously.

It might be easier to use one of the supported distributions, like Debian or Ubuntu. Then the upgrade of DynFi Manager is fully automatic, as described in Upgrading DynFi Manager.