Product Documentation

Configuring FairCom DBAlternative Configuration Methods

Database Administrator's Guide

Previous Topic

Next Topic

Alternative Configuration Methods

FairCom Server offers several methods of setting configuration options. This section explains those options.

Settings File

Your vendor may supply an encrypted settings file, ctsrvr.set, that is not user configurable. Configuration options in this file are critical to the vendor’s application, and should not be deleted. It is possible for the vendor to configure FairCom DB to require this file for startup. Review your vendor’s documentation for guidance on this settings file.

Environment Variables

By default, FairCom DB looks for Server configuration, settings, and license files (named ctsrvr.cfg, ctsrvr.set settings file, and ctsrvr*.lic) in the following locations relative to the working directory of the FairCom DB process:

1. The directory ../config

2. The directory ./config

3. The current directory

FairCom DB supports specifying the location and file name of the Server configuration, settings, and license files using the following environment variables:

  • Configuration files: FCSRVR_CFG_DIR or FCSRVR_CFG1
  • Settings files: FCSRVR_SET
  • License files: FCSRVR_LIC

This feature allows an administrator to specify alternate configuration for specialized purposes.

FCSRVR_CFG_DIR sets the directory where the server will look for its configuration files.

FCSRVR_CFG sets the name of the server configuration file (ctsrvr.cfg).

The environment variables (FCSRVR_CFG_DIR, FCSRVR_CFG, FCSRVR_SET, and FCSRVR_LIC) override the default names and locations when FairCom DB is launched. The environment variable should contain a complete file name for the configuration file.

Example

The environment variables FCSRVR_CFG_DIR and FCSRVR_CFG affect the search for the main configuration file in the following ways:

1. When FCSRVR_CFG_DIR is specified and FCSRVR_CFG is not specified, FairComDB uses the file named ctsrvr.cfg in the directory specified by the FCSRVR_CFG_DIR environment variable.

For example, if FCSRVR_CFG_DIR is set to "../../myconfigdir", FairComDB uses the configuration file named "../../myconfigdir/ctsrvr.cfg".

2. When both FCSRVR_CFG_DIR and FCSRVR_CFG are specified, FairComDB uses the file having the name specified by the FCSRVR_CFG environment variable.

For example, if FCSRVR_CFG_DIR is set to "../../myconfigdir" and FCSRVR_CFG is set to "myconfigdir/ctsrvr.cfg", FairCom DB uses the configuration file named "myconfigdir/ctsrvr.cfg".

To direct FairCom DB to use .\work\my_config.001 as its configuration file on a Windows platform, define FCSRVR_CFG as:

set FCSRVR_CFG=.\work\my_config.001

Likewise, FCSRVR_SET overrides the name and location of the Server Settings file:

(Unix example)

set FCSRVR_SET=/usr/production/my_set.abc

export FCSRVR_SET

FCSRVR_LIC overrides the default name and location of the FairCom Server license file. For example, to use .\myFolder\ctsrvr12345678.lic as the license file:

set FCSRVR_LIC=.\myFolder\ctsrvr12345678.lic

Command-Line Parameters

FairCom DB accepts configuration information from the command-line in addition to the settings and configuration files. Configuration keywords and values listed as command-line arguments take affect after an encrypted settings file, ctsrvr.set, if any, and before the standard configuration file, ctsrvr.cfg. A command-line entry cannot override a settings file entry, and a configuration file entry cannot override a command-line entry (or a settings entry). For more information on the encrypted settings file (ctsrvr.set), see additional documentation included in the Security section of the Knowledgebase in the Customer Portal.

All valid configuration file keywords are supported and may be listed on the command line followed by an appropriate value. No special switch symbols or syntax is required. Simply enter each keyword followed by a value as follows:

faircom FUNCTION_MONITOR YES LOCAL_DIRECTORY C:\MYDATA\

or

ctsrvr FUNCTION_MONITOR YES LOCAL_DIRECTORY C:\MYDATA\

To specify the name and location of your server configuration file, ctsrvr.cfg, when launching the FairCom Server from the command-line, use the command-line keyword CTSRVR_CFG followed by a fully qualified configuration file name as follows:

faircom CTSRVR_CFG C:\myServer\ctsrvr.cfg

faircom CTSRVR_CFG /usr/myserver/myinfo.cfg

or

ctsrvr CTSRVR_CFG C:\myServer\ctsrvr.cfg

ctsrvr CTSRVR_CFG /usr/myserver/myinfo.cfg

The CTSRVR_CFG command line keyword is typically used when running two servers on the same machine, described elsewhere.

Note: The FCSRVR_CFG environment variable supersedes the CTSRVR_CFG keyword, so the file specified in the environment variable will always be the file used.

After successfully opening its main configuration file, FairCom DB uses the location of the main configuration file as the location of its other configuration files.

Here is a list of the other configuration files that FairCom DB uses:

ctagent.json - Configuration file for the ctagent plugin

ctopc.json - Configuration file for the ctopc plugin

ctthingworx.json - Configuration file for the ctthingworx plugin

cttimestamp.json - Configuration file for the cttimestamp plugin

dbnotifyconnections.json - Configuration file for the fcmqclient plugin. The mqclient tables folder named dbnotify is located as a subdirectory of the location of this configuration file

faircomssl.cnf - Configuration file for OpenSSL

fcmemgrid.json - Configuration file for the fcmemgrid plugin

services.json - Configuration file for the cthttpd plugin

TOCIndex