Elasticsearch Combat Series-environment construction

Source: Internet
Author: User
Tags curl
Installing JAVA
Yum Install Java-1.7.0-openjdk-y
Installing Elasticsearch

Elasticsearch only one requirement is to install the latest version of Java. You can download it on the official website: http://www.oracle.com/technetwork/java/javase/downloads/index.html.
You can download it here to the latest version of Elasticsearch:https://www.elastic.co/downloads/elasticsearch.
In writing this article, I elasticsearch the latest version is 2.2.0, followed by 2.2.0 as an example to explain.

[Root@w03 elasticsearch]# curl-l-o https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/ distribution/tar/elasticsearch/2.2.0/elasticsearch-2.2.0.tar.gz
[root@w03 elasticsearch]# tar zxvf elasticsearch-2.2.0.tar.gz
[root@w03 elasticsearch]# CD elasticsearch-2.2.0
Configure Elasticsearch
[Root@w03 elasticsearch-2.2.0]# VI config/elasticsearch.yml

Remove some of the comments, as shown in the following illustration

Run Elasticsearch
Elasticsearch is ready to run, and now you can do it:

[Root@w03 elasticsearch-2.2.0]#./bin/elasticsearch

If you want to keep it running in the background, you can add a-D to the back of the command.
Once successful, you can use another terminal window to test it.

Curl ' Http://localhost:9200/?pretty '

or enter Http://localhost:9200/?pretty in the browser window, you should see the following prompt after carriage return:

{
  "name": "Node-1",
  "cluster_name": "My-application",
  "version": {
    "number": "2.2.0",
    "build_ Hash ":" 8ff36d139e16f8720f2947ef62c8167a888992fe ","
    Build_timestamp ":" 2016-01-27t13:32:39z ",
    " build_ Snapshot ": false,
    " lucene_version ":" 5.4.1 "
  },
  " tagline ":" You Know, for Search "
}

This means that your Elasticsearch cluster is up and running, so we can do a variety of experiments. Clusters and nodes

A node is an instance of a Elasticsearch run. A cluster is a group of nodes with the same cluster.name that work together to share data with each other, providing the ability to fail over and expand. Of course a node can also be a cluster. Q&a

Linux Root Boot Elasticsearch error

[root@w03 elasticsearch-2.2.0]#./bin/elasticsearch
Exception in thread "main" Java.lang.RuntimeException:don ' t Run Elasticsearch as root.
        At Org.elasticsearch.bootstrap.Bootstrap.initializeNatives (bootstrap.java:93) at
        Org.elasticsearch.bootstrap.Bootstrap.setup (bootstrap.java:144) at
        Org.elasticsearch.bootstrap.Bootstrap.init (bootstrap.java:285) at
        Org.elasticsearch.bootstrap.Elasticsearch.main (elasticsearch.java:35) Refer to the log for complete
error details .

Workaround:

Bin/elasticsearch-des.insecure.allow.root=true

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.