Install Elasticserach on window

Source: Internet
Author: User

System environment: 2008R2 x64
Test the installation Server ip:192.168.12.52
Elasticsearch version: 2.3.4
JDK version: JDK 1.8.1_101 (jdk-8u101-windows-x64)

Test to achieve the purpose: Install Elasticsearch and then install Head plug-in and SQL plugin.
Note: If you want to use to do cluster search, word segmentation, monitoring, pinyin word segmentation and so on need to add a different plug-ins (many plug-ins, but a reason to pass the hundred, as long as the first master one or two plug-in installation, and then add a lot more plug-in adding more features is not difficult. )
Another: ES (ie, elasticsearch) distributed search engine, mainly in the Liunx system, this time because the customer is using the WIN server and installed SQL database, so installed on win (but feel not ruled out just find a Linux can connect that win server, In fact, it can be installed on Linux, of course, it is generally not deliberately to do so. So let's try to install the ES service on win! )

Install JDK (i.e. Java environment and configuration environment variables)
This could have been a separate tutorial, but let's go over it together.
Install Java is to click on the Java installation package, basically the mouse all the way down, needless to say.
Then configure the environment variables:
1. New System variable Java_home:
Variable name: java_home
Variable Value: C:\Program Files (x86) \java\jdk1.8.0_11 (variable values vary slightly depending on the path you install)

2. In the system variable, the new system variable classpath:
Variable name: classpath
Variable value:%java_home%\lib;%java_home%\lib\tools.jar; (Some people say that the front dot, I add no)

(Note: Add ".;" Dots and semicolons represent the current path)

3. Modify the system variable Path value:
Add the following before the value of the variable in path:%java_home%\bin;

CMD input java-version, (there are spaces) test can run successfully.

Second, the official website download elasticsearch2.3.4 and unzip to the path that you need to place.
Go to the ES home directory of the bin directory, we can see the following several batch files (if the Linux version of ES will be SH script)

Where Elasticesearch.bat is used for the first installation run and after starting ES, servicer batch is installed ES as a Windows service, which allows ES to boot with boot without the need for manual command line startup, plugin batch is required to install plug-ins.

Three, run cmd, into the ES of the main directory, tap the following command to install the ES service.

The./bin/elaselasticesearch #运行es when the home directory generates the data and log folders and ES is in the startup run;
./bin/service Install #将es安装成windows的服务

Iv. Control Panel-management tools-the service sets the ES service to boot and start.



V. Set up an ES configuration file.
ES configuration file under the Config folder of the home directory, the file name is elasticsearch.yml. It is recommended to use an editor such as notepad++ to open the editor. Specific configuration items can refer to the official website.

We'll just mention one of the network items here, network.host the line into the IP and remove the comment. In addition, we need to modify the default port can be changed in the Http.port line. The default port is 9200.

There are also cluster and node items that are more important in the configuration file.

There is also another place in the Bin folder under the Elasticsearch.in.bat, edit:
Set es_min_men=4g
Set es_max_men=4g
Here is the setting using memory, if the server resources and configuration is high, you can allocate more memory to ES.

VI. Verify the installation is successful.
For example, after the above steps, we can enter the URL on the webpage:
Http://192.168.12.52:9200/_plugin
The presence of a display indicates that the installation was successful. Be careful to fill in your correct IP address according to your actual website. or Http://loaclhost:9200/_plugin


Install Head plugin (Web console).
Let's talk about some general and common plug-in installations, typically head plugins. After we entered the ES master directory, we also borrowed the plugin batch script under the bin to implement the networked installation. (You can also use the Internet to download the way after the offline installation, this way will be discussed later.) )

CD D:/elasticsearch
./bin/plugin Install Mobz/elasticsearch-head
(Note that different versions of Es,install items may be required to become-install, so the reference website is actually the most comprehensive.) )
After installing Head, URL http://loaclhost:9200/_plugin/head verify the installation.

Approximate pages such as.

Similarly, installing SQL Plugins online is also:
./bin/plugin Install Https://github.com/NLPchina/elasticsearch-sql/releases/download/2.3.4.0/elasticsearch-sql-2.3.4.0.zip

As you can understand, plugin (plugin) batch-install-Download the link where the installation package is located.
--------------------

In fact, it is not recommended to install ES on Windows when the server, because the subsequent word-breaker plug-ins, Logstash, JDBC, Kibana and so on win installation will appear troublesome, the actual use is not as good as Linux on the provincial resources. But considering that there will always be some special needs to be used to build ES search service on win, so still need to use it.

Install Elasticserach on window

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.