ControlTier Environment Variables
- Be aware that ControlTier requires the Java Development Kit to be installed. A JRE is not enough.
- If you have previously set the JRE_HOME variable, you will need to reset it to point to JAVA_HOME (or the same path)
On Unix/Linux, a file called .ctierrc will be generated in the home directory of the user that runs the ControlTier installer. This file contains the environment variables that your shell needs to run the ControlTier client and server.
Add the following to your shell profile (e.g. "$HOME/.bashrc"). Be sure the shell profile you choose is read for both interactive and non-interactive shells, so "$HOME/.profile" may not be a good choice.
if [ -f ~/.ctierrc ]; then . ~/.ctierrc else echo ~/.ctierrc not found 1>&2 fi
Source ~/.ctierrrc, for the settings to take immediate effect.
$ . ~/.bashrc
Bash users should source the .ctierrc file from their .bashrc file. Quoting from the bash man page:
Bash attempts to determine when it is being run by the remote shell daemon, in this case sshd. If bash determines it is being run by sshd, it reads and executes commands from ~/.bashrc, if that file exists and is readable.
The .bashrc file is read during remote SSH connections which are non-interactive. The .bash_profile is only read for interactive logins. The .bash_profile can in turn source the .bashrc file. Here's a recommended ordering for the file sourcing:
.bash_profile → .bashrc → .ctierrc
On Windows systems the installer creates a file called ctier.bat in the user's home folder (probably under C:\Documents and Settings). Running this batch file sets the necessary variables and PATH for ControlTier's use:
C:\>set CTIER_ROOT=C:\ctier C:\>set JETTY_HOME=C:\ctier\pkgs\jetty-6.1 C:\>set CTL_HOME=C:\ctier\pkgs\ctl-1.1 C:\>set CTL_BASE=C:\ctier\ctl C:\>set JAVA_HOME=C:\ctier\pkgs\j2sdk1.5.0_15 C:\>set Path=C:\ctier\pkgs\jobcenter-1.0\bin;C:\ctier\pkgs\ctl-1.1\bin;C:\ctier\workbench\bin;C:\ctier\pkgs\jobcenter-1.0\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ctier\pkgs\GRAPHV~1.14\Graphviz\bin;;C:\ctier\pkgs\Graphviz\bin;;C:\ctier\GRAPHV~1.14\Graphviz\bin;;C:\ctier\pkgs\GRAPHV~1.14\Graphviz\bin;;C:\ctier\pkgs\GRAPHV~1.1\Graphviz\bin;"C:\ctier\pkgs\graphviz-2.16\Bin";
Be sure the PATH includes the executables in $CTL_HOME/bin otherwise you might see an error like so:
bash: ctl: command not found
Sourcing the .ctierrc file should insure the PATH is set correctly. Check remote hosts like so:
ssh remotehost which ctl
Be sure a path is returned otherwise, the PATH is not set correctly.