Centos 7.6安装Docker elasticsearch7.17.3

#step1拉取镜像
docker pull elasticsearch:7.17.3

#step2设置虚拟内存
sysctl -w vm.max_map_count=262144

#step3启动docker
docker run -p 9200:9200 -p 9300:9300 --name elasticsearch \
-e "discovery.type=single-node" \
-e "cluster.name=elasticsearch" \
-e "ES_JAVA_OPTS=-Xms512m -Xmx1024m" \
-v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-v /mydata/elasticsearch/data:/usr/share/elasticsearch/data \
-d elasticsearch:7.17.3

#step4加入开机启动
docker update --restart=always elasticsearch

你可能感兴趣的:(centos,docker,elasticsearch)