docker 安装elasticsearch

elasticsearch 是什么?

http://www.elasticsearch.cn

目前全球最流行的大数据搜索与实时分析引擎套件

下载压缩包 存储和检索数据

docker pull elasticsearch:7.4.2					

下载压缩包 可视化检索数据

docker pull kibana:7.4.2				

创建目录

cd /

mkdir -p /mydata/elasticsearch/config

mkdir -p /mydata/elasticsearch/data

echo "http.host: 0.0.0.0" >> /mydata/elasticsearch/config/elasticsearch.yml
 /mydata/elasticsearch/config
 -p 9200:9200  
 -p 9300:9300	
 -e "discovery.type = single-node"	
 -e ES_JAVA_OPTS="-Xms64m -Xmx128m" 

启动 elasticsearch

docker run --name elasticsearch -d -e ES_JAVA_OPTS="-Xms64m -Xmx128m" -e "discovery.type=single-node" -p 9200:9200 -p 9300:9300 elasticsearch:7.4.2

访问

输入http:ip:9200 回车后得到 则es配置成功

{
  "name" : "a3ee6db0578f",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "1mdrZmc8RcafI30PYKE8Lg",
  "version" : {
    "number" : "7.6.2",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "ef48eb35cf30adf4db14086e8aabd07ef6fb113f",
    "build_date" : "2020-03-26T06:34:37.794943Z",
    "build_snapshot" : false,
    "lucene_version" : "8.4.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

posted @ 2022-07-27 14:04  张什么锋  阅读(110)  评论(0编辑  收藏  举报