There are ups and downs in life. There are days when the scenery is infinite, and there are days when the soul is down and out. When people are at their lowest point, they can only “survive and win”.
preface
Docker is a convenient container for installing ElasticSearch. You can use Docker to install ElasticSearch
01
Docker install ElasticSearch image
Go to the Docker Hub page and check ElasticSearch tag: hub.docker.com/_/elasticse…
Here I directly use the current latest 7.6.1, open CMD to execute:
Docker pull elasticsearch: 7.6.1
Once the download is complete, we can view the image we just downloaded from CMD by executing: Docker Images
02
Run Docker’s ElasticSearch image
Open CMD, execute the command to place the image in the container:
Docker run -p 9200:9200 -p 9300:9300 -e discovery.type=”single-node” –name es elasticSearch :7.6.1
Note: -p representsmappingDiscovery. type uses the configuration of the development environment. Single-node means single-node, not cluster. –name gives the container an alias.
CMD to run the container:
docker start es
Run the following command to check whether the startup is successful:
docker ps
03
Matters needing attention
Docker es image, the default installation of x-Pack, X-Pack is a plug-in, integratedSecurity, warning, monitoring, graphics, and reporting functions, but advanced features are available for a fee and can be turned off or uninstalled if not needed
Close the x – pack:
Docker exec it es bash docker exec it es bash
2, modify, elasticsearch. Yml file: execute the command: vi/usr/share/elasticsearch/config/elasticssearch yml
Add xpack.security.enabled: false
4, save,
5. Run the docker restart es command to restart the container
Uninstall X-ray pack
Docker exec it es bash docker exec it es bash
2. Run the./bin/ elasticSearch -plugin remove x-pack command
Total knot
I’m sorry for the slow update of the author. Due to the impact of the epidemic, I’m busy with my personal and company affairs. I’m sorry for that. This issue is mainly about using Docker to install ElasticSearch, try to use text + screenshots to describe the article, to make it easier for you to learn, if you have any questions, you can chat with me on wechat (Cangshuc), note nuggets, or directly leave a comment in the comment section, the author will reply one by one when there is time, thank you for your support. thank you