How To Install Elasticsearch On Windows
If you’re looking to install Elasticsearch and you’re running a Windows operating system, this tutorial will guide you through the process. Elasticsearch can be used on a wide range of machines. Before we get started we’ll provide a few of Elasticsearch own links on hardware requirements and installation.
They also recommend not having more than 30GB of RAM in the ES heap size so Java Virtual Machine (JVM) can use pointer compression, which results in better performance. This is because of how JVM operates on 64-bit platforms. Although, it can vary between Java providers. Generally, ES will perform more efficiently using more nodes with less memory than fewer nodes with larger heap sizes.
The recommendation is to use a version of Elastic’s products with an LTS (“Long Term Support”) option.
The Windows PC or server needs to have Java installed running Java 1.8 and JDK 8 (Only Elasticsearch 7 has support for JDK 9).
Open a command prompt window (Click Start and type
"run"into the search bar, or Windows + R, and type
"cmd"into the Run box).
Once in the command prompt terminal, type
java -versionto have it return the default version of Java. See Oracle’s documentation for more information.
To select a specific version of Java for your machine to use, configure the
JAVA_HOMEenvironment variable. Right-click
My Computerand choose
Properties. Once there, click on
Environment Variablesto edit
JAVA_HOMEso it points your system to the correct software location. For example:
C:Program FilesJavajdk1.X.X(make sure to replace
Xwith the proper version number of JDK).
>NOTE: The Elastic Stack does not have 32-bit support, and so there may be issues installing and running the Elastic products on a 32-bit Windows PC.
Download the Elasticsearch package
Visit Elastic’s download page for Elasticsearch and select the version you want to install.
There are two ways of running Elasticsearch on Windows—running the batch file from the unzipped archive, or downloading and running the MSI installer.
Download the ZIP Archive:
When you’ve selected a desired release version, click on the
"WINDOWS"link to download the ZIP archive.
Once the download has finished, unzip the package with an unzip tool (7-Zip is a free and lightweight unzipping application).
Once the package has been unzipped, navigate to the folder’s locating in Windows Explorer, or open command prompt and
cdinto the directory:cd Elasticsearch-6.6.1
There should be an Elasticsearch Service batch file executable (
elasticsearch-service.bat) in the unzipped directory. You can run the batch file by typing the full filename in command prompt, or by double-clicking the file itself in Windows Explorer
Administratorprivileges may be required to execute the batch file. Either right-click the file and click
"Run as Administrator"or open a command prompt with administrator privileges and execute the program).
Download the MSI Installer:
Select the version of the release that you’d like to install on your Window’s machine and click on the
Once the installer has finished downloading double-click the file and follow all of the steps.
You may want to select a different path to install it on rather than use the default
Running the Elasticsearch Service:
By this point Elasticsearch should be running in a console window outputting cluster and log information.
You can also use cURL in a command prompt window and make a
GETrequest to check if the service is running on your local server:
- cURL must first be downloaded and installed on your Windows machine before you use it to make HTTP requests
NOTE: The latest version (6.2 and newer) will automatically install and setup X-Pack on your nodes as you install the Elastic products.
It’s a good idea to consult Elastic’s documentation on installing X-Pack if you’ve installed version 5 or older of the Elastic Stack
Pilot the ObjectRocket platform free for 30 Days
It's easy to get started. Imagine the time you'll save by not worrying about database management. Let's do this!PILOT FREE FOR 30 DAYS