In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
I. get to know ElasticSearch
Elasticsearch is a real-time distributed search and analysis engine that allows you to explore your data at a speed and scale that you have never had before. It is used as full-text search, structured search, analysis and a combination of these three functions.
Excerpt from Elasticsearch: an authoritative Guide
Elasticsearch is written in Java, which internally uses Lucene for indexing and search, but its purpose is to make full-text retrieval simple, by hiding the complexity of Lucene and instead providing a set of simple and consistent RESTful API.
However, Elasticsearch is not only a Lucene, but also more than just a full-text search engine. It can be accurately described as follows:
A distributed real-time document storage, each field can be indexed and searched. A distributed real-time analysis search engine can expand hundreds of service nodes and support PB-level structured or unstructured data.
Elasticsearch packages all the functions into a separate service so that you can communicate with the simple RESTful API it provides through the program, act as a web client in your favorite programming language, or even use the command line (to act as the client).
Second, environmental dependence
Because Elasticsearch is written in Java, the server needs to have a Java running environment.
Third, service (cluster) construction
Preparatory work:
Download the latest version of the program on the official website: decompress https://www.elastic.co/products/elasticsearch to the specified directory on the server
Focus on two files:
. / bin/elasticsearch service launcher. / config/elasticsearch.yml service configuration file 1. Run a single node instance
A single-node instance does not need to modify the configuration file and can be started directly.
. / bin/elasticsearch # start the service
(. / bin/elasticsearch-d # background running service)
Visit http://localhost:9200/?pretty in the browser and see this interface indicating that the ES service started successfully
two。 Set up a cluster
As shown in the figure, an ElasticSearch cluster consists of a master node and multiple slave nodes.
ElasticSearch cluster building is very simple, each node is running, and each has its own configuration information. Therefore, each node needs to copy a program code, modify their own configuration file information and run.
The specific configuration is as follows:
Master node configuration information:
/ / Cross-domain setting http.cors.enabled: truehttp.cors.allow-origin: "*" / / Cluster configuration cluster.name: Jack-ElasticSearchnode.name: masternode.master: truenetwork.host: 127.0.0.1 Slave node configuration information cluster.name: Jack-ElasticSearchnode.name: slave2network.host: 127.0.0.1http.port: 9202discovery.zen.ping.unicast.hosts: ["127.0.0.1"] 3. Run each node
Reference to run a single node instance
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.