docker安装elsaticsearch

  • 时间:
  • 来源:互联网
  • 文章标签:

1 下载

docker pull elasticsearch:7.7.1

2 创建需要挂载的目录

mkdir -p /mydata/elasticsearch/config
mkdir -p /mydata/elasticsearch/data
mkdir -p /mydata/elasticsearch/plugins

3 允许其他应用访问(kibana)

echo "http.host: 0.0.0.0">>/mydata/elasticsearch/config/elasticsearch.yml

4

docker run --name es771 -p 9200:9200 -p 9300:9300 \
--restart always \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms64m -Xmx128m" \
-v /mydata/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
-v /mydata/elasticsearch/data:/usr/share/elsatcisearch/data \
-v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-d elasticsearch:7.7.1

本文链接http://www.taodudu.cc/news/show-83216.html