• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Show / Hide Table of Contents
  • Installation Guide for NCache
  • Installation Guide for .NET
    • Getting Started
    • Command Line Installation
    • Interactive Windows Installation
    • Network Install with PowerShell
      • Remote Installation
      • Remote Uninstallation
      • Activate NCache Purchased License
    • Evaluation Period Expiration & Extension
    • Activate NCache Purchased License (GUI)
      • Online Activation
      • Manual Activation
    • Deactivate NCache Purchased License (GUI)
      • Online Deactivation
      • Manual Deactivation
    • Command Line License Activation
  • Installation Guide for NCache Java Client
    • What is NCache Java Client?
    • Getting Started
    • Installation Steps for UNIX
    • Post Installation License Management for UNIX
    • Post Installation Client/Server Configuration for UNIX
    • Uninstall NCache Java Client from UNIX
    • Troubleshooting Common Install/Uninstall Problems
  • Licensing Model

Installation Steps for UNIX

This section describes step-by-step instructions for installing NCache Java Client on UNIX. To install NCache Java Client on UNIX:

Installation

In installation, you can make use of the .tar.gz file to install NCache Java Client on your UNIX machine. You can specify some customized parameters such as install directory, a user under which NCache Java Client service will run, network IP to be used by NCache Java Client etc. If you don’t customize any parameters, NCache Java Client is installed according to default values. It is installed in the specified directory and NCache service runs under a default user called “NCache”.

Important

In order to install NCache Java Client on your machine, you need to have “root” privileges.

In order to install NCache Java Client on you UNIX system, please follow these steps:

  • Log in as root user.

  • In UNIX terminal, enter the following command in order to navigate to the directory where you have placed the .tar.gz file of NCache Java Client you downloaded from the Alachisoft website.

[root@servername]# cd [NCache_Java_Client_setup_path]
  • Extract the .tar.gz file through the following command:
[root@servername]# tar –zxvf NCache.Java.Client.tar.gz

The extracted files can be found in the directory named ncache-enterprise-x.x-javaclient

  • Navigate to the directory where .tar.gz has been extracted, through the following command:
[root@servername]# cd ncache-enterprise-javaclient
  • Now is the time to run installation. Use the following command (as root):
[root@servername]# ./install –f John –l Smith –e john@alachisoft.com -u Jenny –k EVAL-KEY –j JAVA_HOME_PATH –I 20.200.20.38
Note
  • EVAL-KEY is emailed to you when you register at Alachisoft website.

  • Please specify JDK/JRE 1.6 or later.

NCache Java Client is now successfully installed on your UNIX machine. After successful installation, you will get the following output message:

Starting NCache service

jvmargument: -Xmx816000m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmx

remote.port=1501 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.man agement.jmxremote.ssl=false -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000, suspend=n -Djava.library.path=/opt/NCache/lib/resources/sigar/ -server

CacheServer.BindToClientServerIP =20.200.20.38
CacheServer.BindToClusterIP=20.200.20.38
CacheManagementServer.Port=8250
CacheServer.Port=9800

Checking service status ...

NCache service started.

You can customize your installation through the following flags:

Flag Purpose
-f/ --firstname First name of the user to which NCache Java Client is licensed.
-l/ --lastname Last name of the user to which NCache Java Client is licensed.
-e/ --email Email address of the user to which NCache Java Client is licensed.
-j/ --javahome It points to the directory where Java Runtime Environment (JRE) or Java Development Kit (JDK) is installed on your system. If no or invalid path is specified, it will search for the java location itself. Recommended java version is 1.6. It will first look for version 1.6; if it is not found, it will search for any greater version available.
-i/ --ipaddress IP address to be used by NCache Java Client, if no IP is specified it will use the first network interface card it finds.
-p/ --installpath Location where NCache Java Client will be installed, by default it will be installed on current location.
-k/ --evalkey You receive this via email from Alachisoft when you downloaded NCache Java Client. If not, then visit http://www.alachisoft.com/download.html to register and obtain one. It is mandatory for you to specify this.

Verify NCache Java Client Installation

After installation you can verify NCache Java Client installation by any of the following ways:

  • In UNIX terminal, enter the following command:
[root@servername]# chkconfig

This command lists system services. If the NCache Java Client service NCached is also listed as follows you can be sure that NCache Java Client has been successfully installed.

NCached        0:off   1:off   2:on    3:on    4:on    5:on    6:off

OR

Set NCHOME to the location where you have installed NCache Java Client through the command:

[root@servername]export NCHOME=/opt/ncache

Then run the following commands:

[root@servername]cd /opt/ncache/bin
[root@servername]./NCached status

If your installation was successful, you should be able to see the following output:

NCache Java Client Server Status: Running

CacheServer.BindToClientServerIP =20.200.20.38
CacheServer.BindToClusterIP=20.200.20.38
CacheManagementServer.Port=8250
CacheServer.Port=9800
  • Navigate to the config folder of NCache Java Client. The server.properties file is placed in this folder. server.properties file can be found in installation directory. This directory is the one you specified through the -p flag. In order to verify your connection, please look up for this file through the following command:
[root@servername]# cd ~/%NCHOME%/config

After locating server.properties, open it in editor. In case of successful installation, you should be able to see your system IP used by property values as follows:

CacheServer.BindToClusterIP=20.200.20.38
CacheServer.BindToClientServerIP=20.200.20.38

What has been installed?

NCache Java Client is installed in the directory you mentioned at the time of installation. In custom .tar.gz installation, this directory will either be the default directory that is /opt/ncache/ or it will be the directory you mentioned at the time of installation using –p parameter.

After installation, you will find the following files in this directory:

  • Configuration Files: The following configuration files are provided in order to configure and run NCache Java Client:
  • config.ncconf
  • client.ncconf

  • Libraries: Various .jar assembly files are provided for you to refer to when developing with NCache Java Client. These libraries are also used by NCache service.

  • Tools: The following NCache Java Client Tools are provided:

    • addclientnode
    • addnode
    • addtestdata
    • clearcache
    • verifylicens
    • removecache
    • createcache
    • createclientcache
    • dumpcache
    • getcachecount
    • ncached
    • listcaches
    • removeclientnode
    • removenode
    • startcache
    • stopcache
    • stresstesttool
    • removeclientcache
  • Documents: Help files and reference documents are provided for you to work with NCache Java Client.

  • Integrations: Some integrations (hibernate, hibernate 3.5) are provided along with the installation. These are used while integrating NCache as second level cache in many provider-based frameworks.

  • Samples: NCache Java Client basic samples are provided on installation; they vary from basic API tests to samples for using integrations.

  • Logs: This folder will contain client and server related logs.

Troubleshooting

java.lang.NoClassDefFoundError

The java.lang.NoClassDefFoundError : com/alachisoft/ncache/licensing/LicenseManager message occurs when the required jar files are not available at their appropriate location. NCache Client API for Java is shipped with the following jar files:

NCClient.jar: The Main NCache Client API file.

NCActivate.jar: The file is responsible for the Activation of NCache. The user may extend his/her evaluation period by running this file. This file can be run by executing the "activate.bat" file.

installer.jar: This file is only for Unix environment and is responsible for NCache client installation on Unix machines.

NCRuntime.jar: The file is responsible for Read-Through/Write-Through caching and Cache Startup operations.

NCSerialization.jar: This file is responsible for dynamic Compact Serialization and object sharing operations.

NCacheSessionProvider.jar: This file is responsible for providing JSP session caching support.

NCUtil.jar: This file contains the methods required by NCache Manager and Service.

swing-layout-1.0.4.jar: This file is providing Java library for GUI.

javassist.jar: This file is the 3rd party library responsible for runtime code generation.

Workaround

Copy all three jar files at the same location and mention location in class-path.

Back to top Copyright © 2017 Alachisoft