Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation tutorial for elasticsearch 5.x

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains the "elasticsearch 5.x installation tutorial", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and study the "elasticsearch 5.x installation tutorial" bar!

About version

The first thing to consider when deciding to use Elasticsearch is the version. Elasticsearch (excluding 0.x and 1.x) currently has the following commonly used and stable major versions: 2.xPower5.xmem6.xmem7.x (current).

You may find that without 3.x and 4.x Magi es jumped directly from 2.4.6 to 5.0.0. In fact, it is for the unification of the version of ELK (ElasticSearch,Logstash,Kibana) technology stack to avoid bringing confusion to users.

When Elasticsearch is 2.x (the last release of 2.x is July 25, 2017), Kibana is already 4.x (the release time of Kibana 4.6.5 is July 25, 2017).

So the next major version of Kibana must be 5.x, so Elasticsearch directly released its own major version to 5.0.0.

After unification, we will not hesitate to choose the version of Elasticsearch and then choose the same version of Kibana. We do not have to worry about the incompatibility of the version.

Elasticsearch is built using Java, so in addition to paying attention to the uniform version of ELK technology, we also need to pay attention to the version of JDK when choosing the version of Elasticsearch.

Because each major version depends on a different version of JDK, version 7.2 already supports JDK11.

As the material I have on hand is version 5.X, I will mainly focus on version 5.x in the learning process. After learning, I will upgrade some articles to version 6.x and 7.x.

Elasticsearch is based on the Java runtime platform, so you need to install JDK 8 and above. Before using es, you need to install JDK and configure the environment variable JAVA_HOME.

The ES version selected for this article is 5.6.x, and the download address is as follows:

Artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.16.zip

The results of the directory in the installation package are shown in the following figure:

Under the bin directory is a series of executable programs

The startup process of elasticsearch,Elasticsearch and the main entrance of Elasticsearch program.

Elasticsearch-env is used for the configuration of environment variables. You can modify the relevant environment configuration here. In most cases, it is not recommended to modify this configuration file directly. You can set it externally through the variable name.

Elasticsearch-translog, mainly used to clean up Translog.

Elasticsearch-keystore, mainly used to manage the keys of Elasticsearch.

Elasticsearch-plugin, plug-in installation tool.

The first few programs of elasticsearch-service* are service management tools for the Windows platform.

Config directory, mainly to store configuration file information

Elasticsearch.yml,Elasticsearch configuration file, using the Yaml file format as the standard.

Configuration of relevant parameters for the jvm.options,Java virtual machine running environment.

Log4j2.properties, log file related configuration.

The lib directory is where the Jar packages that Elasticsearch depends on and its own Java programs are located.

Data directory, where the data is stored by default.

Logs directory, where logs are stored by default.

Modules directory, which stores the internal function modules of Elasticsearch.

The plugins directory, which stores external extensions for Elasticsearch.

We start the service through the elasticsearch.bat script in the bin directory.

The console will output a number of startup information, you can see the environment variables of the startup program, a list of loaded modules and plug-in names, and ports 9200 and 9300 are currently listening. Port 9200 is the RESTful port that Elasticsearch listens on by default, through which you can view some information.

When you access the http://localhost:9200 address, you can see that it contains information such as current node, cluster, version, etc.

{name: "iy6LwI6", cluster_name: "elasticsearch", cluster_uuid: "Xd8hWkX-RI-4brkrOlHO_g", version: {number: "5.6.16", build_hash: "3a740d1", build_date: "2019-03-13T15:33:36.565Z", build_snapshot: false,lucene_version: "6.6.1"}, tagline: "You Know, for Search"}

By default, Elastic only allows local access, and if you need remote access, you can modify the config/elasticsearch.yml file in the Elastic installation directory, uncomment network.host, change its value to 0.0.0.0, and then restart ES.

Network.host: 0.0.0.0

Set to 0.0.0.0 so that anyone can access it. The online service should not be set up like this, but should be set to a specific IP.

Modify logs and data directories

# path.data: / path/to/datapath.data: D:/data/elasticsearch/data## Path to log files:##path.logs: / path/to/logspath.logs: D:/data/elasticsearch/logs Thank you for reading. This is the content of "installation tutorial for elasticsearch 5.x". After studying this article, I believe you have a deeper understanding of the installation tutorial for elasticsearch 5.x. The specific use situation still needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report