Configuration requirements
The Elasticsearch 7.16.2 version has a dependency on JDK version 17.0.1.
Java JDK 17.0.1 Installation
Elasticsearch 7.16.2 has a dependency on JDK version 17.0.1, below are the steps to install JDK 17.0.1:
- Download JDK 17.0.1 installer file.
- Double-click on the downloaded file with the name “jdk-17_windows-x64_bin.exe”.
- The “Setup” window will be displayed as shown below. Press the “NEXT” button to continue the installation.
- The “Destination Folder” window will be displayed where the installation folder needs to be specified. Click on the “Next” button to continue with the default installation folder.
- A new window with the progress details will be displayed, the user would need to wait until the installation process would be completed.
- After successful installation, the completion window will be displayed with a success message. Click on the “Close” button. The installation is completed, and now there is a need of configuring the environment variable for Java.
- To configure the Java environment variable, follow the below steps:
- Go to computer properties.
- Click on the “Advanced system settings” option.
- Click on the “Environment variables” button.
- Under the “System variables,” section click on the “New” button to add the new system variable for JAVA.
- The “Edit System Variable” window will be displayed where valid values for the Variable name and the Variable value field need to be provided. The installed JDK path needs to be set as a value as shown in the below screenshot.
NOTE: Elasticsearch 7.16.2 version searches for JAVA variable with the name “ES_JAVA_HOME” so it’s mandatory to configure system variable with the same name.
Steps to install Elasticsearch 7.6 & 7.16.2 both versions on the same machine :
The following are two ways to install an Elasticsearch service:
- Windows installation (via command prompt)
- MSI file i.e using an Elasticsearch installation widget.
MSI File Installation steps:
- Download the ElasticSearch 7.16.2 version (MSI) installation file.
- After running the MSI file, the “Locations” window will be displayed wherein the user needs to choose the installation directory among the two options shown in the screenshot below. Choose the “Use a custom installation directory” option and provide the appropriate location and then click on the “NEXT” button.
NOTE: Selected directory location should be different from the other installed versions of ElasticSearch. - Now the “Locations Service” window will be displayed. Click on the “NEXT” button by keeping the same options selected as shown in the image below:
- Enter valid details for HTTP port and Transport port fields which should be unique and not same as other installed Elasticsearch versions.
Example: If 9200 and 9300 are already configured as HTTP and Transport port respectively for the older version of Elasticsearch then while configuring the 7.16.2 version on the same machine user should use a different port for HTTP and Transport for example 9600 and 9500 for HTTP and Transport port respectively. - Then click on the “NEXT” button to proceed with the installation.
- After successful installation, users will be able to see the installed search services i.e ElasticSearch 7.6 and 7.16.2 in the window's services list. Change the startup type from "Manual" to "Automatic" from service properties.
- Browse the localhost URL with the configured HTTP port i.e. 9200 like http://localhost:9200/ to make sure that ElasticSearch 7.16.2 is installed successfully and the same link can be configured in the web.config file of Znode API and Web Store.
Note: While configuring the 7.16.2 version of ElasticSearch on the same system where already older versions are available make sure to configure valid values for the HTTP port and Transport port and those should not be the same as other installed Elasticsearch versions.
Windows Installation Steps (via command prompt):
- Download the ElasticSearch setup (ZIP file for CMD installation) for the 7.16.2 version.
- Unzip the downloaded set-up at the desired location.
- Edit the “elasticsearch-service.bat” file available in the bin folder of the “elasticsearch-7.16.2” folder and make the following changes.
- Enter the proper value for SERVICE_ID like elasticsearch-service-7.16.2
- In OpenJDK, we need to set the JVM heap size according to the machine/server. For that edit the “jvm.options'' file available in the config folder of the “elasticsearch-7.16.2” folder and make the following changes (here we are setting heap size to 4GB):
-Xms4g
-Xmx4g
- Edit the “elasticsearch.yml” file available in the config folder of the “elasticsearch-7.16.2” folder and make the following changes:
- bootstrap.memory_lock: false
- cluster.name: elasticsearch
- http.port: 9200
- node.data: true
- node.ingest: true
- node.master: true
- node.max_local_storage_nodes: 1
- node.name: System name
- path.data: D:\ElasticSearch\elasticsearch-7.16.2\data
- path.logs: D:\ElasticSearch\elasticsearch-7.16.2\logs
- transport.tcp.port: 9300
- xpack.license.self_generated.type: basic
- xpack.security.enabled: false
- Configure valid HTTP port.
- Path of data folder available in the “elasticsearch-7.16.2” folder should be set as the value for path.data.
- Path of logs folder available in the “elasticsearch-7.16.2” folder should be set as the value for path.logs.
- All the above-mentioned settings will automatically get added in the elasticsearch.yml file if the installation is done.
- Set the machine name as the value for the “node. name”.
- The data and logs folder path should not be the same as other installed Elasticsearch versions.
- Open the command prompt in administrative mode.
- Follow the below steps to install the Elasticsearch service:
- cd {path of the bin folder available in the “elasticsearch-7.16.2” folder}
e.g.: cd D:\ElasticSearch\elasticsearch-7.16.2\bin - Press enter
- Enter the following commands:
- elastic search-service.bat install. The success message will be shown.
- elastic search-service.bat start. The success message will be shown.
- cd {path of the bin folder available in the “elasticsearch-7.16.2” folder}
- After successful installation, the search service can be seen in the window's services list. Change the startup type from "Manual" to "Automatic" in the service properties.
Important
The following points need to be taken care of at the time of installation:
- If there are environment variables with the name “ES_HOME” and “ES_PATH_CONF” available in the “System Variables” section then delete them.
- Some of the settings which are already available or can be added in the “elasticsearch.yml” file are deprecated and will be removed in future releases of Elasticsearch, more information will be available in the “elasticsearch_deprecation.log” file, located in the “config” folder of Elasticsearch setup.