Install Elasticsearch under Windows

Source: Internet
Author: User

Prior to the installation, configuration and example of Linux under Elasticsearch, this article installs Elasticserach in a Windows environment. 1. Download
2017-8-25 Blog Update--
Original Elasticsearch failure, please click here to download elasticsearch-5.5.0

Because the es5.5.0 file directory is not the same as the previous version, the full text of this article is updated according to es5.5.0.

2. Configuring the Java Environment

Download the 64-bit jdk:jdk-8u-win-x64
or 32-bit jdk:jdk-8u-win-x86.
Double-click the downloaded JDK file and follow the prompts to install the JDK and JRE.

To see if Java is installed correctly:

java -version
    • 1

The installation was successful.

3. Unzip the Elasticsearch to a directory, such as D:\softwares_diy\elasticsearch-5.5.0

Figure 2 4. Install into the bin directory, double-click Execute Elasticsearch.bat 3,

Figure 3

Enter http://localhost:9200 and the following page appears, indicating that the installation was successful.

Figure 4

On the page JSON name is the name of the node, the cluster name is Elasticsearch, there are other version information, if you want to stop, CTRL + C

1. Installation Prerequisites

The JDK8 version is already installed under Windows

2. Download Elasticsearch

Https://www.elastic.co/cn/downloads/elasticsearch#ga-release------Download Zip package, unzip the downloaded zip file, Directly run the bin under the Elasticsearch.bat this file, and then access the 127.0.0.1:9200 of this machine, appear to illustrate ES installation success.

Figure One:

3, Installation Nodejs

3.1:https://nodejs.org/en/download/download the appropriate MSI according to your system and double-click Install.

Problem Description: The first attempt to install Nodejs in the ES of the installation directory (sibling directory), when installing the head plug-in, when the implementation of Npm-install found NPM This directory exception disappeared, and then reinstall Nodejs, Installation fails if the installation directory is placed directly in the ES directory and the file name path is too long to be reported during installation

WORKAROUND: Now a disk will be Nodejs installed, and then into the form of compressed package, in the ES directory re-decompression (directory shown in figure II)

Figure II:

Episode: Problems installing here: Win10 The error code is 2502

The cause of this problem: the operating rights of the system is insufficient, as long as we get Super Administrator privileges, or administrator rights after the problem will be resolved

Workaround: Open Task Manager, locate the Explorer.exe process---then right-click on the process----tap file-run a new task, follow Tusi to create the task, and tick create this task with system administrative privileges. When you install or uninstall files again, you will not be able to report the problem of insufficient permissions.

Description: Explorer.exe is a Windows Program Manager or File Explorer that manages the Windows graphics shell, including desktop and file management

Figure three: Figure IV:

3.2 Use Node-v to view your NOJS version, use Npm-v to view NPM version, execute npm install-g grunt-cli command, install Grunt

Figure V:

4. Install Head

4.1 Modify Elasticsearch.yml File

Add at the end of the document

Http.cors.enabled:true
Http.cors.allow-origin: "*"
Node.master:true
Node.data:true

Release network.host:192.168.0.1 's comment and change to network.host:0.0.0.0

Let go of Cluster.name;node.name;http.port's notes.

Double-click Elasticsearch.bat to restart ES

4.2 Https://github.com/mobz/elasticsearch-head Download the zip file and unzip it into the development directory, see figure II

4.3 Modifying E:\elasticsearch-5.4.1\elasticsearch-head-master\Gruntfile.js

Figure VI:

Enter E:\elasticsearch-5.4.1\elasticsearch-head-master\_site Modify App.js The following content for the server address, if the native deployment is not modified can also.

4.4 Enter the following directory to perform the NPM install command

Finally, start Nodejs under the head source code directory:

The installation finishes executing grunt server or NPM run start (each time later), appears to prove that the installation was successful, and if unsuccessful, exit ES and then perform NPM install-g grunt-cli

Appears as shown to prove the installation was successful:

Visit localhost:9100

Install Elasticsearch under Windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.