docker版本
Docker version 19.03.2, build 6a30dfca03
以root用户执行
1 docker pull elasticsearch:5.6.11
2 mkdir -p /opt/elasticsearch/config
3 mkdir -p /opt/elasticsearch/data
4 echo "http.host: 0.0.0.0" >> /opt/elasticsearch/config/elasticsearch.yml
5 docker run --name elasticsearch5.6.11 -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -v /opt/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml -v /opt/elasticsearch/data:/usr/share/elasticsearch/data -d 362c5cb1669b
6 检测一下是否安装成功
root@zsw-vi:/opt/elasticsearch# curl http://localhost:9200
{
"name" : "_7s3N3T",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "z7J1JGmQQeWyKD-K0TBZ4A",
"version" : {
"number" : "5.6.11",
"build_hash" : "bc3eef4",
"build_date" : "2018-08-16T15:25:17.293Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"
},
"tagline" : "You Know, for Search"
}
安装kibana
1 docker pull kibana:5.6.11
2 docker run --name kibana5.6.11 -e ELASTICSEARCH_URL=http://192.168.166.128:9200 -p 5601:5601 -d 388661dcd03e
3 浏览器访问http://192.168.166.128:5601
网友评论