Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

Configuring the Environment Variable

The following environment variables need to be set in order to use the CUBRID. The necessary environment variables are automatically set when the CUBRID system is installed or can be changed, as needed, by the user.

CUBRID Environment Variables
  • CUBRID : The default environment variable that designates the location where the CUBRID is installed. This variable must be set accurately since all programs included in the CUBRID system uses this environment variable as reference.
  • CUBRID_DATABASES : The environment variable that designates the location of the database location information file. The CUBRID system saves and manages the absolute path of database volumes that are used in the $CUBRID_DATABASES/databases.txt file (see the Databases.txt file in the "Administrator’s Guide").
  • CUBRID_LANG : The environment variable that designates the language that will be used in the CUBRID system. Currently, CUBRID provides English (en_US) and Korean (ko_KR.euckr and ko_KR.utf8). it is not a mandatory setting. Therefore, if the variable has not been set, then refer to the LANG environment variable or use en_US, which is the default value (see the Language Setting section for details).

The above mentioned environment variables are set when the CUBRID is installed. However, the following commands can be used to verify the setting.

For Linux :

% printenv CUBRID
% printenv CUBRID_DATABASES
% printenv CUBRID_LANG

In Windows :

C:\> set CUBRID

Related OS Environment Variables
  • PATH : In the Linux environment, the directory $CUBRID/bin, which includes a CUBRID system executable file, must be included in the PATH environment variable.
  • LD_LIBRARY_PATH : In the Linux environment, $CUBRID/lib, which is the CUBRID system’s dynamic library file, must be included in the LD_LIBRARY_PATH (or SHLIB_PATH or LIBPATH) environment variable.
  • Path : In the Windows environment, the $CUBRID/bin, which is a directory that contains CUBRID system’s execution file, must be included in the Path environment variable.
  • JAVA_HOME : To use the Java stored procedure in the CUBRID system, the Java Virtual Machine (JVM) must be installed, and the JAVA_HOME environment variable must designate the concerned directory.
Configuring the Environment Variable
For Windows

If the CUBRID system has been installed in the Windows environment, then the installation program automatically sets the necessary environment variable. Select [Systems Properties] in [My Computer] and select the [Advanced] tab. Click the [Environment Variable] button and check the setting in the [System Variable]. The settings can be changed by clicking on the [Edit] button. See the Windows help for more information on how to change the environment variable in the Windows environment.

gs_must_env_var_1.png

For Linux

If the CUBRID system has been installed in the Linux environment, the installation program automatically creates the .cubrid.sh or .cubrid.csh file and makes configurations so that the files are automatically called from the installation account’s shell log-in script. The following is the .cubrid.sh environment variable setting file that was created in an environment that uses sh, bash, etc.

CUBRID=/home1/cub_user/CUBRID
CUBRID_DATABASES=/home1/cub_user/CUBRID/databases
CUBRID_LANG=en_US
ld_lib_path=`printenv LD_LIBRARY_PATH`
if [ "$ld_lib_path" = "" ]
then
LD_LIBRARY_PATH=$CUBRID/lib
else
LD_LIBRARY_PATH=$CUBRID/lib:$LD_LIBRARY_PATH
fi
SHLIB_PATH=$LD_LIBRARY_PATH
LIBPATH=$LD_LIBRARY_PATH
PATH=$CUBRID/bin:$CUBRID/cubridmanager/cmclient:$PATH
export CUBRID
export CUBRID_DATABASES
export CUBRID_LANG
export LD_LIBRARY_PATH
export SHLIB_PATH
export LIBPATH
export PATH