Ensure Environment Prerequisites for Java Cache
NCache Enterprise Java Edition provides a tar.gz file for installing NCache on your Linux machine through the terminal as described in the steps discusssed below.
Note
To learn about the supported Java versions, please refer to the NCache Installation Guide.
Steps to Ensure Environment Prerequisites for Java Cache
- Download and extract the NCache tar.gz file:
tar -zxf <Path to tar.gz file>
- Switch to the NCache setup extracted directory using the following command:
cd ncache-enterprise
- For detailed installation usage, run the following command:
sudo ./install -h
Please refer to the Installation Guide for more details on Installation.
Before you start creating caches and cache clusters, you need to ensure that the following criteria have been met:
- In the case of Java installation, ensure that the NCache Service is started. But, in case you did not, you can do so by typing the following command in a terminal:
> sudo systemctl start ncached
If you have a firewall enabled, then you need to make sure to expose NCache specific ports, the details of which are provided in the Configure Firewall section.
If you're using a Distributed Cache with Persistence or Distributed Lucene with Persistence In-Memory Store type, it is strongly encouraged that you use an SSD instead of an HDD for optimal performance.
Configure Firewall for TCP (Optional)
If you have a firewall or a router between your cache clients (web/app servers) and the cache servers, then you must open up specific ports in your firewall. This will ensure that cache clients are able to talk to the cache servers.
NCache server uses the following TCP ports for communication.
- Client/Server Port: 9800 (Default TCP port for cache client and server communication).
- Management Port: 8250 (Default TCP port for PowerShell cmdlets and NCache Service).
- Cluster Port: Cluster-port that you define in a cache cluster configuration. It is recommended to use a consecutive range of ports (the default range is 7800-7900). Configure Firewall to allow communication on this port range.
- Cache Management Port: The port range for cache management. The default port range is 8300-8400.
- Web Management Port: 8251 (Default TCP port for NCache Management Center).
- JMX Listener Port: 8257 (Default TCP Port for JMX Counters).
If you want to use bridge, open the following ports:
- Bridge Port: Default is 9900.
- Bridge Management port: Default is 8260.
- Bridge Ports: Default port range is 10000-11000.
If there is a port conflict and the above default ports are being used by other applications, then you must configure all the cache servers to use different ports.
Step 1: Modify Alachisoft.NCache.Daemon.dll.config file (Optional)
This file is located in /opt/ncache/bin/service folder on all cache servers.
You can change the "Port" for Client/Server communication and "ManagementPort" for NCache management in the file below.
<appSettings>
...
<add key="NCacheServer.Port" value="9800"/>
<add key="NCacheServer.ManagementPort" value="8250"/>
...
</appSettings>
Step 2: Restart NCache Service
Anytime you modify Alachisoft.NCache.Daemon.dll.config, you must restart NCache Service on the servers. Do the following in the terminal of your choice:
> sudo systemctl restart ncached
See Also
NCache Installation Guide
Create a Cache
Simulate Cache Usage
Monitor Caches using NCache Monitor