Wednesday, February 6, 2013

How to Install and Run GemFire

 

Prerequisites :

1. Download : http://www.springsource.com/products/gemfire-evaluation-download
2. Download : JDK from Oracle site
 

To Install the JDK Software and Set JAVA_HOME on a UNIX System


  1. Install the JDK software.
    1. Go to http://java.sun.com/javase/downloads/index.jsp.

    2. Select the appropriate JDK version and click Download.
      The JDK software is installed on your computer, for example, at /usr/jdk/jdk1.6.0_02. You can change this location.
  2. Set JAVA_HOME.

    • Korn and bash shells:
      export JAVA_HOME=jdk-install-dir
      export PATH=$JAVA_HOME/bin:$PATH

    • Bourne shell:
      JAVA_HOME=jdk-install-dir
      export JAVA_HOME
      PATH=$JAVA_HOME/bin:$PATH
      export PATH

    • C shell:
      setenv JAVA_HOME jdk-install-dir
      setenv PATH $JAVA_HOME/bin:$PATH
      export PATH=$JAVA_HOME/bin:$PATH


  3. Change the permissions to enable you to run the GlassFish ESB Installer.
    chmod 755 JavaCAPS.bin



To Install the JDK Software and Set JAVA_HOME on a Windows System




  1. Install the JDK software.


    1. Go to http://java.sun.com/javase/downloads/index.jsp.


    2. Select the appropriate JDK software and click Download.
      The JDK software is installed on your computer, for example, at C:\Program Files\Java\jdk1.6.0_02. You can move the JDK software to another location if desired.

  2. Set JAVA_HOME:


    1. Right click My Computer and select Properties.


    2. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02.

Install Gemfire :


Locate the GemFire package folder in terminal / command prompt  then execute the below command to install GemFire on your machine.

%JAVA_HOME%\bin\java.exe -jar GemFire65_Installer.jar

This installs the Gemfire
 

Running GemFire Application :


1.  Set the JAVA_HOME environment variable to point to your Java runtime installation. There should be a bin directory under JAVA_HOME.
2.  Set the GEMFIRE environment variable to point to your GemFire installation.
3.  Update your PATH environment variable to include the bin directories under JAVA_HOME and GEMFIRE.
For example, for Unix Bourne and Korn shells (sh, ksh, bash):
> PATH=$PATH:$JAVA_HOME/bin:$GEMFIRE/bin;export PATHand Windows
> set PATH=%PATH%;%JAVA_HOME%\bin;%GEMFIRE%\bin
4.  Update your CLASSPATH environment variable to include the GemFire classes:
Unix Bourne and Korn shells (sh, ksh, bash):
> CLASSPATH=$GEMFIRE/lib/gemfire.jar:$GEMFIRE/lib/antlr.jar:$GEMFIRE/lib/gfSecurityImpl.jar:$CLASSPATH;export CLASSPATH
Windows:
> set CLASSPATH=%GEMFIRE%\lib\gemfire.jar;%GEMFIRE%\lib\antlr.jar;%GEMFIRE%\lib\gfSecurityImpl.jar;%CLASSPATH%
5.  Set a GF_JAVA environment variable to point to the java executable file under your JAVA_HOME.
Unix Bourne and Korn shells (sh, ksh, bash):
> GF_JAVA=$JAVA_HOME/bin/java;export GF_JAVA
Windows:
> set GF_JAVA=%JAVA_HOME%\bin\java.exe
 

Running in Pure Java Mode :


GemFire Enterprise is designed to run as documented on platforms running Solaris, Linux, and Microsoft Windows.
GemFire Enterprise runs with some functional differences in pure Java mode without GemFire native code.
In pure Java mode Gem Fire's Java code does not call any of its own native methods. Distributed system members still have access to Gem Fire's caching and distribution capabilities.
To run in pure Java mode, your application must have the proper CLASSPATH settings and must not have access to the GemFire native library.
Pure Java mode is enabled automatically when Gem Fire's Java code cannot load the GemFire native library. Pure Java mode can be forced on platforms that support native code by renaming the native library in the product tree, or by setting the GemFire.pure Java Mode system property to true on members running user applications.
The Programming APIs
The Java APIs, supplied in product Dir/lib/GemFire.jar, allow you to configure your distributed system and cache, manage and query cached data, and run administrative tasks.

 


Packages


com.gemstone.gemfire :
Statistics,Logging,DataSerialization,and System Failure.The classes, interfaces, and               exceptions used for logging and sta­tistics and for  data serialization and system failure  management. This includes the LogWriter and Statistics classes that allow application-specific logging and statistics gathering. This also includes DataSerializable and SystemFailure.
com.gemstone.gemfire.admin :
Administration API Tools for administering and monitoring GemFire distributed systems.
com.gemstone.gemfire.cache:
Caching An implementation of distributed object caching that is capable of leveraging GemFire’s distribution capabilities. This package includes Cache, Region, and Region.Entry interfaces.
com.gemstone.gemfire.cache.client:
Client Used to configure client applications for communication with cache servers.
com.gemstone.gemfire.cache.query:
Querying and Indexing An implementation of OQL querying for local cache data and continuous querying on a server by a client. Supplemented by querying shortcut methods in cache.Region.
com.gemstone.gemfire.cache.server:
Server Used to run GemFire servers and to replace the default GemFire server load probe software with custom software written by you.
com.gemstone.gemfire.cache.util:
Customized Caching Classes Utilities for use with the caching classes. These utilities include an object sizer that returns the size of the object passed in, con­venience stub implementation classes for GemFire application plug-ins  and customized application plug-ins that implement the client side in client/server caching.
com.gemstone.gemfire.distributed:
Distributed System Membership Common tools for  GemFire distributed systems including the Distributed Member and Locator classes.
com.gemstone.gemfire.security:
Security and Authorization Tools for authenticating and authorizing system and data access.


No comments :