##### Child pages
• Installing Flux
Go to start of banner

# Installing Flux

This guide describes the installation procedure for Flux on both Windows and Unix/Linux Operating Systems.

Edit fluxConfig.js and clear your browser cache !

After installing Flux edit the following file <FLUX INSTALLATION DIRECTORY>/webapp/javascript/mx/fluxConfig.js for your environment. Then clean your browser cache and retry connecting to Cockpit. The cockpit URL is: https://<HOSTNAME>:7186

See below the contents of the fluxConfig.js:

Default fluxConfig.js configuration file
//Set the Cockpit connection parameters here - and default username and password
hostName = window.location.hostname;  // Specify this host name or IP address of the host running the ops console webapp
username = 'admin';  // default user name to show in the login dialog - can be changed
machineType = 'dev'; // Used to set the navigation bar color. Options are production, qa, and dev
// operationsTabEnabled = true;  // OPTIONAL Not fully implemented yet
// contextPath = '';  // OPTIONAL Uncomment and change this value if flux is running within a context, e.g., flux/ or scheduler/
//autoRefreshRate = 1; // OPTIONAL Used to set the rate (in minutes) that the dashboard page refreshes. Must be a integer from 1 to 60.
// moment.tz.setDefault('America/Chicago');  // OPTIONAL Set the default timezone to populate the timezone dialogs if not using local time
// End of Cockpit connection parameters

# Windows

To install Flux on Windows, follow these steps:

1. Download and install the Flux package to your system. This can be done in one of two ways:
1. Download and run the EXE installer (following the on-screen instructions where prompted by the installer), or
2. (If you are installing Flux from the ZIP archive) Navigate to the Flux directory and edit the file setenv.bat located there. Find the line:

set JAVA_HOME=<Java home>

Make sure that <Java home> is set to one of the following:

1. The location of your Java installation directory (like C:\path\to\java), or
3. (If you are installing Flux from the ZIP archive) While in the Flux directory, run the configure.bat script. This script will configure all of the files necessary for Flux to launch the Operations Console web application.
4. (If this is not an evaluation version of Flux) Install the license key as described in License Keys.
5. (Optionally) Follow the steps described in Configuring Flux to run with Databases to connect Flux to your enterprise database.

That's it! Flux is now installed and ready to run using the .bat scripts included in the Flux installation directory. There, you can find scripts for starting unsecured engines, secured engines, The Flux Designer, and the Flux Operations Console (the Flux web application).

If this is your first time using Flux, the quick start guides located in /doc/quick_start_guides under your Flux installation directory are a great place to get started learning about Flux, and the best ways to use and interact with each of its components.

## Installing Flux as a Windows Service

NOTE: If you have installed Flux using the EXE installer, you will find three services automatically installed: a secured engine service, an Operations Console (web application) service, and a Flux agent service.

.bat scripts for installing Windows services are included in /service/windows under your Flux installation directory. To install a particular Flux component as a service, simply navigate to this directory and run the installation script for that service (for example, to install the engine service, you would run the install-engine.bat script).

In addition, each service includes a .conf file for configuring the service. These .conf files provide information like the location of the configuration files for each service (engine, agent and operations console service scripts), and the name and location of the wrapper log file where standard out and standard error from the service will be directed.

These .conf files also specify the name and description of the services as they will appear in the Windows Services console. You can change this information by editing the following lines in the file:

wrapper.ntservice.name=
wrapper.ntservice.displayname=
wrapper.ntservice.description=

### Installing the Flux Agent as a Windows Service

To install the Flux agent as a service, you must first edit the .conf (configuration) file for the agent service to point to the correct engine. The configuration settings for agents are supplied in the lines that look like:

wrapper.app.parameter.<number>=<value>

Each configuration option is supplied on two lines; the first line specifications the name of the configuration property (with a "-" symbol before the property name), while the second line specifies the value. So, for example, to specify the configuration file that should be used to configure the agent, you could set:

wrapper.app.parameter.2=-configurationfile
wrapper.app.parameter.3=<path\to>\\agent-config.properties

The numbers on these lines are sequential, so if you add or remove a configuration option, it is necessary to update the numbers for all of the subsequent wrapper.app.parameter.<number> values to remain in order.

You will need to supply the same set of parameters for both the "start" and "dispose" commands for the agent. Your configuration file will end up containing parameters that look something like:

wrapper.stop.conf = agent.stop.conf
wrapper.app.parameter.1 = agent-server
wrapper.app.parameter.2 = -configurationfile
wrapper.app.parameter.3 = <path\to>\\agent-config.properties
wrapper.app.parameter.4 = start

Your agent stop configuration will end up containing parameters that look something like:

wrapper.app.parameter.1=agent-client
wrapper.app.parameter.4=dispose
wrapper.stopper = true
include=agent.conf

Next, you'll want to edit your agent configuration file (agent-config.properties) according to the configuration settings in Flux Agents. You may, for example, need to edit the file to specify a host where the engine is running, a username / password to connect to the engine, port usage settings, or other configuration options.

Once the configuration is set, you can install the agent service by running install-flux-agent-service.bat.

# Explanation of the Windows Service configuration files

Below you will find a break down of the service configuration files (agent.conf, engine.conf, opsconsole.conf) located in the Flux installation directory in the /service/windows folder.

## Flux startup properties

These are the properties that refer to the startup of Flux. They include the path to the local Java installation, engine/agent configuration (depending on the service configuration file) and Flux user and password to be used when starting Flux and accessing the Operations Console.

#********************************************************************
# Flux Service Properties
#********************************************************************

placeHolderSoGenPropsComeHere=


## Running the Services under a different user account

By default, Flux Windows services run under the LOCALSYSTEM account. Should you need to run the service under a different Windows user account, just update the lines below of the .conf files (engine.conf, agent.conf, opsconsole.conf) with the user account information:

# wrapper service user. only for windows. on *nix system this is root.
wrapper.ntservice.account=USER
wrapper.ntservice.password=PASSWORD

When updating this information, please make sure that the user account has the right to write to the Flux logs folder and to the .flux folder.

# Unix / Linux

To install Flux on Unix or Linux, follow these steps:

2. (If your environment does not have a JAVA_HOME system enviroment variable set) Navigate to the Flux directory and edit the file setenv.sh located there. Find the lines:

#JAVA_HOME=$JAVA_HOME #export JAVA_HOME Remove the "#" symbol from the start of each line, and change the$JAVA_HOME parameter to the location of your Java installation. This might look something like:

JAVA_HOME=/path/to/java/home
export JAVA_HOME

3. Edit the /etc/hosts file on the system as described in Installing License Keys on Unix / Linux.
4. (If this is not an evaluation version of Flux) You should have a license key file for your version of Flux (if you don't, contact support@fluxcorp.com to request one). Install the license key as described in License Keys.
5. Make sure the Flux installation folder has the permissions needed to run as described in Database and File System Permissions.
6. (Optionally) To enable persistent storage of workflows and data, follow the steps described in Configuring Flux to run with Databases to connect Flux to a database.

That's it! You are now ready to run Flux using the .sh scripts included in the Flux installation directory. There, you can find scripts for starting unsecured engines, secured engines, The Flux Designer, and the Flux Operations Console (the Flux web application).

If this is your first time using Flux, the quick start guides located in /doc/quick_start_guides under your Flux installation directory are a great place to get started learning about Flux, and the best ways to use and interact with each of its components.

## Installing Flux as a Unix or Linux Service

Unix service scripts were updated in Flux 8.0.10 to run on various linux environments.

You can find .sh scripts for all Flux services (engine, agent and operations console) located in /service/unix under your Flux installation directory. You need to make couple changes to setenv.sh located under the Flux home directory, before running the services.

# Reference your java home
JAVA_HOME=/usr/lib/jvm/java-oracle
FLUX_DIR=/home/user/flux-8-0-13

These scripts can be installed as service using standard techniques for your particular Operating System. Follow these steps if you are using the supplied scripts.

----------------------------------------------------------------------
Copy the engine script to /etc/init.d directory (requires root access)
----------------------------------------------------------------------
cp /home/flux/flux-8-0-13/service/unix/engine.sh /etc/init.d/flux-engine

----------------------------------------------------------------
Add FLUX_HOME to /etc/default/flux-engine (requires root access)
----------------------------------------------------------------
echo "FLUX_HOME=/home/flux/flux-8-0-13" > /etc/default/flux-engine

-------------------------------------------------------------------
Append JAVA_HOME to /etc/default/flux-engine (requires root access)
-------------------------------------------------------------------
echo "JAVA_HOME=/usr/lib/jvm/java-7-oracle" >> /etc/default/flux-engine

-------------------------------
Check the service configuration
-------------------------------
service flux-engine status

----------------
Start the engine
----------------
service flux-engine start

---------------
Stop the engine
---------------
service flux-engine stop

---------------------------------------------------------------------
Copy the agent script to /etc/init.d directory (requires root access)
---------------------------------------------------------------------
cp /home/flux/flux-8-0-13/service/unix/agent.sh /etc/init.d/flux-agent

---------------------------------------------------------------
Add FLUX_HOME to /etc/default/flux-agent (requires root access)
---------------------------------------------------------------
echo "FLUX_HOME=/home/flux/flux-8-0-13" > /etc/default/flux-agent

------------------------------------------------------------------
Append JAVA_HOME to /etc/default/flux-agent (requires root access)
------------------------------------------------------------------
echo "JAVA_HOME=/usr/lib/jvm/java-7-oracle" >> /etc/default/flux-agent

-------------------------------
Check the service configuration
-------------------------------
service flux-agent status

---------------
Start the agent
---------------
service flux-agent start

--------------
Stop the agent
--------------
service flux-agent stop

-----------------------------------------------------------------------
Copy the console script to /etc/init.d directory (requires root access)
-----------------------------------------------------------------------
cp /home/flux/flux-8-0-13/service/unix/console.sh /etc/init.d/flux-console

-----------------------------------------------------------------
Add FLUX_HOME to /etc/default/flux-console (requires root access)
-----------------------------------------------------------------
echo "FLUX_HOME=/home/flux/flux-8-0-13" > /etc/default/flux-console

--------------------------------------------------------------------
Append JAVA_HOME to /etc/default/flux-console (requires root access)
--------------------------------------------------------------------
echo "JAVA_HOME=/usr/lib/jvm/java-7-oracle" >> /etc/default/flux-console

-------------------------------
Check the service configuration
-------------------------------
service flux-console status

-----------------
Start the console
-----------------
service flux-console start

----------------
Stop the console
----------------
service flux-console stop

## Autostarting Flux on RedHat and CentOS

Redhat and CentOS installations need a small amount of additional configuration.

You’ll need to add these 2 lines (in bold) to /etc/init.d/flux-engine, flux-console, and flux-agent (if you are running agents).

#!/usr/bin/env bash

#

# Startup script for flux engine (or console or agent) under *nix systems.

#chkconfig: 345 95 05

#description: Flux Engine | Flux Console | Flux Agent (depending upon the script)

Then you need to run the following commands to register the services for autostart, and setting their run level for when they will autostart.  The 345 run level will autostart Flux if the server is running with or without a GUI.

chkconfig --levels 345 flux-engine on

chkconfig --levels 345 flux-console on

chkconfig --levels 345 flux-agent on

After you reboot Flux will autostart. Note that if you run service flux-engine start (or service flux-console start or service flux-agent start) from root (not as a daemon) it will start and not return control back to the command promot until pressing Enter. This is expected since in this instance the service is running under root's command shell, and not as a daemon.

# Installing Flux in an Application Server

You can install Flux as a servlet in an application container as well. For more information, see the /examples/software_developers/servlet directory under your Flux installation directory. This example directory includes sample code for creating Flux as a servlet, as well as a script to package the servlet as a WAR file (which you can then deploy to your application server using standard techniques for that container).

This method of installation is recommended for advanced users only and requires knowledge of Java code for configuring and creating the Flux engine.

# Additional Libraries Needed for Strong Encryption

To take advantage of all encryption ciphers you may need to install the JCE Unlimited Strength Jurisdiction Policy Files distributed by Oracle.  Due to export restriction the version of the policy files bundled by default with the JDK allow "strong" but limited cryptography to be used.  The "unlimited strength" policy files contain no restrictions on the cryptographic strengths.

## Installation

1.  Identify the location of the JVM/JDK you are using.

Example

c:\program files\java\jre

2. Extract the contents of the Unlimited Strength Jurisdiction Policy Files to a temporary directory.

3. Copy the local_policy.jar and US_export_policy.jar files extracted in the previous step to the lib\security directory of your JRE making sure to backup previous versions of these jar files should you decide to revert back to the previous installation.

Example

c:\program files\java\jre\lib\security

# After Installing - Configure the Runtime Configuration Properties File

See here for specifics.

• No labels