In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about how to deploy ElasticSearch in Docker. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
What is ElasticSearch?
Elasticsearch also uses Java development and uses Lucene as its core to implement all indexing and search functions, but its goal is to hide the complexity of Lucene through simple RESTful API, thus making full-text search simple.
However, Elasticsearch is not just about Lucene and full-text search, we can also describe it like this:
Distributed real-time file storage in which each field is requested
Citation and can be searched for distributed real-time analysis search engine
Can scale to hundreds of servers to handle PB-level structured or unstructured data
II. Docker deployment of ElasticSearch
2.1 pull the image
Docker pull docker.elastic.co/elasticsearch/elasticsearch:6.3.2
2.2 run the container
The default port of ElasticSearch is 9200. By mapping port 9200 of the hosting environment to port 9200 in the Docker container, we can access the ElasticSearch service in the Docker container, and we name the container es.
The copy code is as follows:
Docker run-d-- name es-p 9200 discovery.type=single-node 9200-p 9300 discovery.type=single-node 9300
2.3 configure cross-domain
2.3.1 enter the container
Because of the configuration, you need to go to the container to modify the corresponding configuration information.
Docker exec-it es / bin/bash
2.3.2 configure
# display file ls results are as follows: LICENSE.txt README.textile config lib modulesNOTICE.txt bin data logs plugins# enter configuration folder cd config# display file ls results are as follows: elasticsearch.keystore ingest-geoip log4j2.properties roles.yml users_roleselasticsearch.yml jvm.options role_mapping.yml users# modify configuration file vi elasticsearch.yml# join cross-domain configuration http.cors.enabled: truehttp.cors.allow-origin: "*"
2.3 restart the container
Because the configuration has been modified, the ElasticSearch container needs to be restarted.
Docker restart es
The display is as follows:
III. Docker deployment of ElasticSearch-Head
Why install ElasticSearch-Head because you need an administrative interface to view ElasticSearch-related information
3.1 pull the image
Docker pull mobz/elasticsearch-head:5
3.2 run the container
Docker run-d-name es_admin-p 9100V 9100 mobz/elasticsearch-head:5
The display is as follows:
The above is the editor for you to share how to deploy ElasticSearch in Docker, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
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.