Elasticsearch Installation Configuration Detailed

Source: Internet
Author: User
Tags versions zip

Elasticsearch requires a minimum of 7 versions of Java, and the Oracle JDK 1.8.0_73 version is recommended when writing this article. Java installation and platform-related, so this article does not intend to describe how to install Java on each platform. Before you install Elasticsearch, run the following command to check your Java version:

Java-version
Echo $JAVA _home

Once we have the Java installation done, we can download and install Elasticsearch. The binary installation package can be downloaded via the Www.elastic.co/downloads Web site, which contains other previously released versions. For each release you can choose to download zip or tar compressed files, or Deb and RPM packages. For simplicity's sake, I choose the tar compression pack here.

We download the Elasticsearch 2.3.4 Tar installation package (the window user can choose to download the ZIP compression package) by following the command:

Curl-l-O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/ 2.3.4/elasticsearch-2.3.4.tar.gz

Then unzip it using the following command:

TAR-XVF elasticsearch-2.3.4.tar.gz

After this command is run, a new folder will be created in your current directory, which contains a number of files, and we use the following command to enter the Bin directory:

CD Elasticsearch-2.3.4/bin

We use the following command to start the Elasticsearch node and form a cluster of individual nodes (for Windows users using the Elasticsearch.bat command):

./elasticsearch

If everything is OK, you can see the log information as follows:

./elasticsearch
[2014-03-13 13:42:17,218] [INFO] [Node] [New Goblin] version[2.3.4], pid[2085], build[5c03844/2014-02-25t15:52:53z]
[2014-03-13 13:42:17,219] [INFO] [Node] [New Goblin] initializing ...
[2014-03-13 13:42:17,223] [INFO] [Plugins] [New Goblin] loaded [], sites []
[2014-03-13 13:42:19,831] [INFO] [Node] [New Goblin] Initialized
[2014-03-13 13:42:19,832] [INFO] [Node] [New Goblin] starting ...
[2014-03-13 13:42:19,958] [INFO] [Transport] [New Goblin] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.8.112:9300]}
[2014-03-13 13:42:23,030] [INFO] [Cluster.service] [New Goblin] new_master [New goblin][rwmtgj3dqouz2r6zfl9v4g][mwubuntu1][inet[/192.168.8.112:9300] ], Reason:zen-disco-join (elected_as_master)
[2014-03-13 13:42:23,100] [INFO] [Discovery] [New Goblin] elasticsearch/rwmtgj3dqouz2r6zfl9v4g
[2014-03-13 13:42:23,125] [INFO] [HTTP] [New Goblin] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.8.112:9200]}
[2014-03-13 13:42:23,629] [INFO] [Gateway] [New Goblin] recovered [1] indices into cluster_state
[2014-03-13 13:42:23,630] [INFO] [Node] [New Goblin] Started

There is no explanation for the above output, but we can see from the log output above that we started the node name "New Goblin" (in your case it might not be the same as the name), and it chose to be the master node, now you do not need to understand the meaning of master, All you need to know is that we started a node and formed a single node cluster.

As mentioned earlier, we can rewrite the name of the cluster and the name of the node, and we can specify when we start Elasticsearch on the command line:

./elasticsearch--cluster.name My_cluster_name--node.name my_node_name

We can also configure these properties in the CONF/ELASTICSEARCH.YML configuration file.

From the output log above, we can also see that the Elasticsearch node that was started also binds the 192.168.8.112:9200. By default, Elasticsearch uses port 9200 to provide the rest API service, and of course we can configure it.

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.