命令
docker run -d --name es --ulimit nofile=65530:131072 -p 9200:9200 -p 9300:9300 -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" docker.elastic.co/elasticsearch/elasticsearch:6.3.2
ES_JAVA_OPTS参数是为了避免Java内存溢出。
命令:
docker run -d --name es -p 9200:9200 -p 9300:9300 -v esData1:/usr/share/elasticsearch -e "discovery.type=single-node" elasticsearch:6.5.1
-e ES_JAVA_OPTS="-Xms=256m -Xms=256m"
docker run -d --name es --ulimit nofile=65530:131072 -p 9200:9200 -p 9300:9300 -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" docker.elastic.co/elasticsearch/elasticsearch:6.3.2
docker run -d --name es -p 9200:9200 -p 9300:9300 -e ES_JAVA_OPTS="-Xms=256m -Xms=256m" docker.elastic.co/elasticsearch/elasticsearch:6.3.2
-e "ES_JAVA_OPTS=-Xms512m -Xmx512m"
postman自动插入数据,创建索引:
postman访问ES服务器.png
安装head插件
docker pull mobz/elasticsearch-head:5
docker run -d -p 9100:9100 docker.io/mobz/elasticsearch-head:5
网友评论