Elasticsearch installed on Windows and Linux systems, respectively

Source: Internet
Author: User
Tags elastic search

Windows System Installation
1. Installing the JDK
Elastic search requires the use of a higher version of the JDK, this article uses D:\DevTools\jdk1.8.0_131 and configures environment variables

2. Install Elastic Search
Official website: https://www.elastic.co/cn/

Https://www.elastic.co/downloads/elasticsearch
This use version: elasticsearch-2.4.6 2.x version uses 1.8 below JDK will error, command Window Flash back, unzip can.

3. Use
Double-click Elasticsearch.bat file under installation directory D:\DevTools\elasticsearch-2.4.6\bin

4. Testing
Page access:
Http://localhost:9200/or Http://127.0.0.1:9200/

Linux system Installation
1. Download the installation package
Elasticsearch-2.2.0.tar.gz
Upload to Linux system, unzip TAR-XZVF elasticsearch-2.2.0.tar.gz

2, direct start will be error
Because of the version of the issue, the latest version of the security level has increased, not allowed to start with the root account, so we want to add a user. Because Elasticsearch has the function of remote execution script, so it is easy to Trojan virus, so it is not allowed to start with the root user, root user is not up, assign permissions, with the general user start.

---------------------------------------
#添加一个用户: Elasticsearch
$useradd Elasticsearch
#给用户elasticsearch设置密码, input 2 consecutive times
$PASSWD Elasticsearch
#创建一个用户组 ES
Groupadd ES
#分配 Elasticsearch to ES Group
Usermod-g Elasticsearch ES
#这里注意下, if the prompt user "es" does not exist, then because of the server version problem, you can switch to Usermod-g es Elasticsearch, that is, users and user groups to use the swap.
#在elasticsearch the root directory, given user rights. -R indicates a stepwise (n-tier directory), * denotes any file
Chown-r elasticsearch.es *
#切换到elasticsearch用户
Su Elasticsearch
-----------------------------------
If you do not assign the permissions directory to the user Elasticsearch as above. Then the following error will be reported:
Java.io.filenotfoundexception:/home/es/elasticsearch-2.2.0/logs/elasticsearch.log (Permission denied)

Elasticsearch installed on Windows and Linux systems, respectively

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.