• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
  • Java Edition
  • Linux Installer
Show / Hide Table of Contents
  • Installation Guide
  • Planning
    • Edition Comparison
    • Capacity Specification
    • Requirements
    • Security Considerations
    • Firewalls & Ports
    • Multiple NCache Versions
  • .NET Edition
    • Prerequisites
    • Windows Installer
      • Windows Installer (Wizard)
      • Windows Installer (Command Line)
      • Network Installation with PowerShell
        • Remote Install NCache
        • Remote Uninstall NCache
    • Linux Installer
    • Docker
  • Java Edition
    • Prerequisites
    • Linux Installer
    • Docker
    • Windows Installer
      • Windows Installer (Wizard)
      • Windows Installer (Command Line)
  • Client Installation
    • .NET
    • Java
    • Python
    • Node.js
  • Evaluation Period Management
  • NCache Licenses
    • Licensing Model
    • License Management
      • Activate License
      • Reactivate License
      • Deactivate License
  • Upgrading NCache
    • Upgrade Servers and Clients
    • Upgrade Servers Only
    • Live Upgrade Servers
    • Apply Private NCache Patches
  • OS Upgrades and Patches
    • Windows Upgrades and Patches
    • Linux Upgrades and Patches
    • NCache Maintenance Mode
    • Disable Auto Restart

Installation for Linux

This section contains all the steps you should follow to install NCache Enterprise Java Edition on your Linux machine. Everything is explained step-by-step to make the process simple and easy.

Install NCache on Linux Machine

NCache Enterprise provides a tar.gz file for installing NCache on your Linux machine through the terminal.

  • Download the NCache Enterprise (Java 17) and place it in your desired location.

  • In the terminal, extract the tar.gz file through the following command:

tar -zxf <Path to tar.gz file>
Note

After extraction, the installation scripts are placed in the folder named ncache-enterprise.

  • In the terminal, go to the directory where the NCache installation script is placed.
cd ncache-enterprise
Note

The sudo command grants you the Admin rights and privileges to run NCache scripts.

  • For detailed installation usage, run the following command in your terminal:
sudo ./install -h
Warning

By default the installer automatically picks the path for Java but if it fails to do so due to multiple java installations or problematic installlation please use --javahome or -j in the command below to provide installation path for Java 17.

  • Alternatively, pick the type of installation you want like Server Mode, Client Mode, or Developer Mode. For example,
sudo ./install -f John -l Smith -e johnsmith@yourdomain.com -c your_company_name -k XXXXXXXXXXXXXXXXX -m server -s yes -i 20.200.20.38 -P password
Note

Make sure that the email address provided is the one used during your registration process with Alachisoft.

  • This will initiate NCache installation, and once it is completed, a message will be displayed saying Installation completed successfully.

    NCache .NET Core Installation

Note
  • NCache is installed in the /opt/ncache folder by default.
  • Once NCache is installed, the NCache Service will start running automatically.

Server Mode

For the NCache server mode installation, run the following command. Notice that -m server indicates Server Mode installation.

sudo ./install -f John -l Smith -e johnsmith@yourdomain.com -c your_company_name -k XXXXXXXXXXXXXXXXX -m server -s yes -i 20.200.20.38 -P password

Client Mode

Installing NCache Client involves the same steps as for the Server mode. To differentiate, simply write -m client instead of -m server.

sudo ./install -f John -l Smith -e johnsmith@yourdomain.com -c your_company_name -m client
Warning

If you miss any of these fields above, an installation error will occur.

Developer Mode

Installing NCache Developer mode involves the same steps as for the Client mode. To differentiate, simply write -m dev instead of -m client.

sudo ./install -f John -l Smith -e johnsmith@yourdomain.com -c your_company_name -m dev
Warning

If you miss any of these fields above, an installation error will occur.

Uninstall NCache from Linux Machine

For uninstallation, go to the ncache-enterprise directory, where all the necessary scripts are placed.

cd ncache-enterprise
  • In the terminal, execute the following command:
sudo ./uninstall
  • You will be asked a Yes/No question to confirm uninstallation, simply reply with y.

    NCache Java Edition Uninstall

Installer Reference for Linux

The following properties are supported by NCache installation by tar.gz:

Note

Properties with * are required properties.

Switch/Properties Purpose Default Value
-j, --javahome Path of Java home directory. JAVA_HOME environment variable
-k, --installkey* The key you are provided with upon downloading NCache. -
-m, --installmode* Specifies the installation type. Possible values are:
  • server (Cache Server).
  • client (Cache Client).
  • dev (Developer Mode).
  • server (Cache Server)
    -f, --firstname* Your first name. -
    -l, --lastname * Your last name. -
    -c, --company* Your company name. -
    -e, --email* Your email address which is used during registration with Alachisoft. -
    -s, --startcache Switch parameter to auto start the demoCache at the end of installation. Possible values are:
  • -s yes start the cache.
  • -s no do not start the cache.
  • Start cache.
    -i, --ipaddress IP address that NCache Service binds to. IP of the local machine.
    -p, --installpath Installation path. /opt/ncache
    -F, --force Force create a destination directory if the provided directory does not exist. -
    -P, --password Password for user 'ncache'. -

    Troubleshooting

    Java Path Not Found

    If JDK 17 is installed on your system, the installer will automatically get the installation path for java, but if it fails to do so due to multiple java installations or problematic setup please use --javahome or -j to provide installation path for Java 17.

    JAVA_HOME variable is not Set

    To esure smooth functioning of Java-based management tools, you need to set JAVA_HOME in your system's environment variables. As it ensures the global access for all the tools. If it is not set already, please follow the steps below to set the variable.

    • Find the directory where you have installed Java. If you’ve installed it through a package manager, it might be in a path like /usr/lib/jvm/. You can also use the update-alternatives command to find the installed Java paths as follows:

      update-alternatives --config java

    • You can also use the whereis command, this will also show the path of the Java binary:
      whereis java

    • Once you have the path, you need to set the JAVA_HOME variable in your user's shell profile. For Bash (the default shell in many Linux distributions), edit your .bashrc or .bash_profile in your home directory:
      nano ~/.bashrc
    • Then add the following line at the end of the file (replace /path/to/java with the actual path to your Java installation):
      export JAVA_HOME=/path/to/java
    • For the changes to take effect, you can either restart your terminal, log out and log back in, or source the profile file:
      source ~/.bashrc
    • In the same profile file (~/.bashrc), add JAVA_HOME to your PATH variable so that the system knows where to find the Java executable files:
      export PATH=$JAVA_HOME/bin:$PATH
    • To confirm that JAVA_HOME has been set correctly, you can echo the variable:
      echo $JAVA_HOME
    • To ensure the java command is being picked from the JAVA_HOME path, check with:
      which java

    See Also

    Java Prerequisites
    Evaluation Period Management
    License Management

    In This Article
    • Install NCache on Linux Machine
      • Server Mode
      • Client Mode
      • Developer Mode
    • Uninstall NCache from Linux Machine
    • Installer Reference for Linux
    • Troubleshooting
      • Java Path Not Found
      • JAVA_HOME variable is not Set
    • See Also

    Contact Us

    PHONE

    +1 (214) 764-6933   (US)

    +44 20 7993 8327   (UK)

     
    EMAIL

    sales@alachisoft.com

    support@alachisoft.com

    NCache
    • NCache Enterprise
    • NCache Professional
    • Edition Comparison
    • NCache Architecture
    • Benchmarks
    Download
    Pricing
    Try Playground

    Deployments
    • Cloud (SaaS & Software)
    • On-Premises
    • Kubernetes
    • Docker
    Technical Use Cases
    • ASP.NET Sessions
    • ASP.NET Core Sessions
    • Pub/Sub Messaging
    • Real-Time ASP.NET SignalR
    • Internet of Things (IoT)
    • NoSQL Database
    • Stream Processing
    • Microservices
    Resources
    • Magazine Articles
    • Third-Party Articles
    • Articles
    • Videos
    • Whitepapers
    • Shows
    • Talks
    • Blogs
    • Docs
    Customer Case Studies
    • Testimonials
    • Customers
    Support
    • Schedule a Demo
    • Forum (Google Groups)
    • Tips
    Company
    • Leadership
    • Partners
    • News
    • Events
    • Careers
    Contact Us

    • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

    • Contact Us
    •  
    • Sitemap
    •  
    • Terms of Use
    •  
    • Privacy Policy
    © Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
    Back to top