Installing Elasticsearch as a service on Windows Server 2012

Prerequisites:

Before installing Elasticsearch on Windows Server 2012, install the latest Oracle JDK and set the JAVA_HOME environment variable.

To install Elasticsearch as a service on Windows Server 2012

  1. Download Elasticsearch
  2. Click on Start and type Explorer and click File Explorer
  3. Right-click on Local Disk (C:) and select New > Folder and type Elasticsearch
  4. Locate and double-click the Elasticsearch downloaded file
  5. Double-click on the Elasticsearch-<version> folder and select all the items
  6. Right-click on the items and click Copy
  7. Click on Local Disk (C:) and right-click on the Elasticsearch folder and click Paste
  8. Click Start and type in cmd and right-click Command Prompt
  9. Click Run as administrator
  10. Type in cd\Elasticsearch and press Enter
  11. Type in cd bin and press Enter
  12. Type in elasticsearch-service.bat install and press Enter
  13. Ensure the command prompt reports a successful installation
Installing service : "elasticsearch-service-x64"
Using JAVA_HOME (64-bit): "C:\Program Files\Java\jdk1.8.0_121"
The service 'elasticsearch-service-x64' has been installed.

To set Elasticsearch to start automatically when Windows starts

  1. Click Start and type in services and click Services
  2. In the list, locate the Elasticsearch service
  3. Right-click on the service and click Properties
  4. Change Startup type to Automatic
  5. Click OK

To verify the Elasticsearch installation

  1. Click on Start and type in Internet Explorer and press Enter
  2. In the address bar, type in http://localhost:9200 and press Enter
  3. If a JSON file downloads the installation was succesful
Advertisements