Your InfoHub distribution comes with three Bourne shell environment setup scripts that automatically define InfoHub environment variables and display the commands to create an InfoHub database and a global directory if they do not already exist. These scripts are designed to give you a friendly out-of-the-box InfoHub operations experience. Even though you can perform normal InfoHub operations without using these scripts, it is important to go through these scripts to understand the how to manage environment configuration for InfoHub. These scripts are as follows:
infohub_site.sh
Contains placeholders for defining ihsrcdir
(the source directory of your InfoHub distribution), gtmgbldir
(the InfoHub global directory which resides in the same directory as the InfoHub database and services), and gtm_dist
(the GT.M distribution used to run InfoHub).
infohub_profile.sh
Sources $HOME/infohub_site.sh
, creates an environment for InfoHub using the environment variables defined in infohub_site.sh
. It displays commands to create an InfoHub database and global directory if they do not already exist. When it detects a misconfiguration, it displays the misconfigured environment variable name and stops execution.
To use these environment setup scripts, perform the following steps:
Copy infohub_site.sh
to $HOME/.infohub_site.sh
.
Use your favorite editor to open $HOME/.infohub_site.sh
or customize it in place as 'custom_infohub_site.sh
' and set appropriate values for:
ihsrcdir
: Path to the directory holding your InfoHub distribution files.
gtmgbldir
: Absolute path to the global directory where you want to place your InfoHub database and InfoHub services.
gtm_dist
: Path to the directory of the GT.M distribution (V6.0-002 or above) used to run InfoHub.
Source infohub_profile.sh
on the command line or add the following command in your ~/.profile
.
$ source /path/to/infohub_profile.sh
When you source a infohub_profile.sh, it displays the commands to set up a default InfoHub environment (global directory and a default database) if none exists.
Execute the following command to load the server1.conf configuration file (discussed later in this document)
$ $gtm_dist/mumps -run InfoHub --action=configure --file=$ihsrcdir/configs/server1.conf
Execute the following command to start an InfoHub:
$ $gtm_dist/mumps -run InfoHub --action=start
Execute the following command to display the status of InfoHub with process listing:
$ $gtm_dist/mumps -run InfoHub --action=full
Execute the following command to shutdown an InfoHub:
$ $gtm_dist/mumps -run InfoHub --action=shutdown
Execute the following command to rundown an InfoHub:
$ $gtm_dist/mumps -run InfoHub --action=rundown
To perform any InfoHub operation without using the infohub_*.sh scripts, at a bare minimum, you need to set the following environment variables:
gtm_dist: Set the gtm_dist environment variable to point to the location of the GT.M distribution (which must be V6.0-002 or higher).
export gtm_dist=/usr/lib/fis-gtm/V6.0-002_x86_64
GTMXC_gtmposix: Set the environment variable GTMXC_gtmposix to point to the absolute location of gtmposix.xc.
export GTMXC_gtmposix=$gtm_dist/plugin/gtmposix.xc
gtmroutines: Set the environment variable gtmroutines to include the current directory and location of the InfoHub installation, here we used /opt/InfoHub, $gtm_dist and the location of the %POSIX.m routine (typically installed to $gtm_dist/plugin/r).
export gtmroutines="$PWD(/opt/InfoHub /opt/InfoHub/pipecmds /opt/InfoHub/plugins) $gtm_dist/plugin/o($gtm_dist/plugin/r) $gtm_dist"
gtmgbldir: Set the environment variable gtmgbldir to point to the location of the global directory for your InfoHub database.
export gtmgbldir=/path/to/InfoHub.gld
If you are not using the InfoHub environment setup scripts provided with your InfoHub distribution, set the minimum key and record sizes to 1000 and 4000 respectively and block size to 4096 for the global directory for your InfoHub database. The InfoHub Bourne shell Environment setup scripts run a GDE command file to automatically set these values for the InfoHub global directory.
For more information on performing InfoHub operations, refer to Starting an InfoHub, Monitoring (checking) an InfoHub, Restarting an InfoHub, Shutting down an InfoHub, Rundown an InfoHub, Troubleshooting (debugging) an InfoHub, and Purging an InfoHub.