In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article Xiaobian introduces in detail for you "how to use docker to install elasticsearch and head plug-ins", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to use docker to install elasticsearch and head plug-ins" can help you solve your doubts.
I. Overview
Elasticsearch and head plug-ins need to be deployed on the server
Environment description
Operating system: centos 7.6
Docker version: 19.03.12
Ip address: 192.168.31.190
Second, install and download image docker pull elasticsearch:7.5.1docker pull mobz/elasticsearch-head:5-alpine to modify the system parameter vi / etc/sysctl.conf
Adjust parameters
Vm.max_map_count=262144
Refresh parameter
Sysctl-p
Configuration file
Temporary start
Docker run-d\-- name=elasticsearch\-p 9200 discovery.type=single-node 9200-p 9300 discovery.type=single-node 9300\-e "cluster.name=elasticsearch"\-e "ES_JAVA_OPTS=-Xms512m-Xmx1024m"\ elasticsearch:7.5.1
Copy a file
Mkdir-p / data/elk7docker cp elasticsearch:/usr/share/elasticsearch/data / data/elk7/elasticsearch/docker cp elasticsearch:/usr/share/elasticsearch/logs / data/elk7/elasticsearch/docker cp elasticsearch:/usr/share/elasticsearch/config / data/elk7/elasticsearch/chmod 777-R / data/elk7/elasticsearch/
Edit configuration file
Vi / data/elk7/elasticsearch/config/elasticsearch.yml
The contents are as follows:
Cluster.name: "docker-cluster" network.host: 0.0.0.0http.cors.enabled: truehttp.cors.allow-origin: "*"
Note: the last 2 lines must be added, otherwise cross-domain access will be denied when the head plug-in connects.
Start elasticsearch
Delete the temporary
Docker rm-f elasticsearch
Start
Docker run-d\-- name=elasticsearch\-- restart=always\-p 9200 cluster.name=elasticsearch 9200\-e "cluster.name=elasticsearch"\-e "discovery.type=single-node"\-e "ES_JAVA_OPTS=-Xms512m-Xmx1024m"\-v / data/elk7/elasticsearch/config:/usr/share/elasticsearch/config\-v / data/elk7/elasticsearch/data:/usr/share/elasticsearch/data\-v / data/elk7/elasticsearch/logs : / usr/share/elasticsearch/logs\ elasticsearch:7.5.1
Wait about 30 seconds, check the docker log, if there is any
"publish_address {172.17.0.2 9300}, bound_addresses {0.0.0.0 VR 9300}"
It means the startup is successful.
Test access
Http://192.168.31.190:9200/
The effect is as follows:
Launch the elasticsearch head plug-in docker run-d\-- name=elasticsearch-head\-- restart=always\-p 9100 name=elasticsearch-head 9100\ docker.io/mobz/elasticsearch-head:5-alpine
Visit the page
Http://192.168.31.190:9100/
Enter the es address and click the connection. The effect is as follows:
Read here, this "how to use docker to install elasticsearch and head plug-ins" article has been introduced, want to master the knowledge of this article also need to practice and use in order to understand, if you want to know more about the article, 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.