gfsh Installation and Configuration

Installation

gfsh is distributed with GemFire 6.6 and the launcher scripts for gfsh are available inside the GemFire product/bin directory.

Note: gfsh stores some configuration files under user's HOME directory. If you have used older version of gfsh before, the file .gfshrc and the directory .gemfire might be there in the HOME directory. Delete or move these from the HOME directory before starting this latest version of gfsh.

Configuration

To start using gfsh, follow these steps:


  1. Start a command line/shell & set environment variable GEMFIRE to point to the GemFire product directory

    Windows:

    set GEMFIRE=C:\GemFire66
    

    Unix (bash):

    export GEMFIRE=/home/foo/GemFire66
    
  2. Include GemFire66/bin directory to the PATH environment variable.

    Windows:

    set PATH=%GEMFIRE%\bin;%PATH%
    

    Unix (bash):

    export PATH=$GEMFIRE/bin:$PATH
    
  3. Set PATH to include the Java bin directory. Alternatively, you can set GF_JAVA to the absolute path of the java executable. gfsh is tested with Oracle/Sun Java 1.6.

    Windows:

    set GF_JAVA=C:\jdk\bin\java.exe
    

    Unix (bash):

    export GF_JAVA=/opt/jdk/bin/java
    
  4. Set one or more of the following environment variables to include your application library files. Note that gfsh requires only the classes that are instantiated for transmitting data to/from the fabric. These objects are typically of the application data object classes.
    GEMFIRE_APP_CLASSPATH - The application classpath. Use this environment variable to explicitly
                            list class and jar paths.
    
    GEMFIRE_APP_JAR_DIR - The directory that contains application jar files. All jar files under this
                          directory and sub-directories are included in the class path.
    

As an alternative to using these environment variables, you can copy your jar files into the gfsh plug-in directory, gemfire-dir /plugins. gfsh adds all jar files to this directory including sub-directories to its class path.