Five, docker mount installation and configuration elasticsearch

1, the search elasticsearch

docker search elasticsearch

Here Insert Picture Description

Because you want to download the specified version 6.6.2, we go to the official website to see if there is a specified version
https://hub.docker.com/
Here Insert Picture Description
see the results, there is, we pulled the specified version

2, Download image

docker pull elasticsearch:6.6.2

The download is complete, View

docker images

3, start:

docker run -e ES_JAVA_OPTS="-Xms256m -Xmx256m" -d -p 9200:9200 -p 9300:9300 --name=es-pro elasticsearch:6.6.2

Parameters Resolution:

-e ES_JAVA_OPTS = "- Xms256m -Xmx256m" heap memory size restrictions, prevent elasticsearch start occupying too much memory, (due to the default start-up parameters are es 2g, our virtual machine sometimes is not big enough, you can modify the JVM startup parameters are not 256 starts)

-d start background

-p 9200: 9200 port mapping virtual machine 9200 to 9200 of elasticsearch port (web communication default port 9200)

-p 9300: 9300 port mapping virtual machine 9300 to 9300 elasticsearch port (the distributed case, the communication between the respective nodes by default port 9300)

-Name es-pro specify a name (es-pro optionally specify)
elasticsearch: 6.6.2: image name

3, browser and enter their own virtual machine ip and port elasticsearch of 9200, operating results in the following figure represents a successful installation
success stories are as follows:
Here Insert Picture Description

In fact, the first time I did not start up, found every few seconds to flash back,
we use docker View Log

docker logs es-pro 

max virtual memory areas vm.max_map_count [65530]
Here Insert Picture Description
is too low, increase to at least [262144] As given, can be solved by the following

vi /etc/sysctl.conf

Add a line vm.max_map_count = 655360

Load Parameters

sysctl -p

Restart es

dockerr start es-pro

View Log:
Here Insert Picture Description

We can see, my es up

Use your browser to view,
Here Insert Picture Description

OK, solved!

4, the mounting plug elasticsearch-hear

1, download the image
docker pull mobz / elasticsearch-head: 5

2, the boot image
docker run -d -p 9100: 9100 --name = es-head mobz / elasticsearch-head: 5
Here Insert Picture Description

Published 14 original articles · won praise 2 · Views 167

Guess you like

Origin blog.csdn.net/weixin_41402056/article/details/105202146