Lucene learning-install Elasticsearch Server

Source: Internet
Author: User

Full-text Search is the most common demand, Open-source Elasticsearch is currently the first choice of Full-text search Engine.

It's at the bottom of the open Source Library lucene, But we can't use Lucene directly. You must write the code yourself to invoke its interface.

The Elasticsearch is a Lucene package that provides the operator interface for the REST API and is very handy.

first, Install Java 8

Elasticsearch requires a Java 8 Environment.

If it is not installed, please refer to:

http://blog.csdn.net/justdoit_potato/article/details/77962670

second, Installation Elasticsearch

1. Download the compressed package

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.1.zip

2. Unzip

Unzip elasticsearch-6.0. 1. Zip

3. Start

./elasticsearch-6.0. 1/bin/elasticsearch

Possible error at startup: root user not allowed to run

Workaround:

1. Create a new user

AddUser [user]

2. Granting permissions to new users

chown -r [user] [elasticsearch installation directory]

3. Switch to a new user

su [user]

Complete.

third, Remote Access

By default, Elasticsearch only allows native access, if remote access is Required.

1. Open the configuration file

Vim elasticsearch-6.0. 1/config/elasticsearch.yml

2. Uncomment the Network.host configuration and change the value to 0.0.0.0

0.0. 0.0

3. may not start after the change, error:

Workaround:

1. sysctl.conf configuration file

VI /etc/sysctl.conf

Add or modify a configuration

Fs. file-max=655350  vm.max_map_count=655360

After saving settings take effect

// make effective sysctl-p

2. limits.conf configuration file

Vim/etc/security/limits.conf

Add configuration

655350 655350

4. Re-login to SSH and try to start Elasticsearch again.

To switch to a non-root user, start:

./elasticsearch-6.0. 1/bin/elasticsearch

Lucene learning-install Elasticsearch Server

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.