Elasticsearch部署及可视化工具

#1.第一种方法
[root@cerebro ~]# docker pull elastic/elasticsearch:7.6.1  ##提前拉取镜像
[root@cerebro ~]#docker run --name es -p 9200:9200 -p 9300:9300 -d -e “discovery.type=single-node” elasticsearch:7.3.0   ##docker命令直接部署es  -d: 后台运行容器,并返回容器ID,也即启动守护式容器; -e 指定环境变量
[root@cerebro ~]# docker images 
REPOSITORY              TAG       IMAGE ID       CREATED         SIZE
elastic/elasticsearch   7.6.1     41072cdeebc5   17 months ago   790MB
[root@cerebro ~]# docker run --name es -p 9200:9200 -p 9300:9300 -d -e "discovery.type=single-node" elastic/elasticsearch:7.6.1
fd12fa46332bf5e081da0cc00008a8a4d6c9ab02a942ab5af6ab0eece7415123
[root@cerebro ~]# docker ps 
CONTAINER ID   IMAGE                         COMMAND                  CREATED         STATUS         PORTS                                                                                  NAMES
fd12fa46332b   elastic/elasticsearch:7.6.1   "/usr/local/bin/dock…"   4 seconds ago   Up 3 seconds   0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 0.0.0.0:9300->9300/tcp, :::9300->9300/tcp   es

#2.第二种方法
[root@cerebro ~]# cat docker-compose.yml 
version: '2'
services:
  # Elasticsearch service
  es:
    image: elasticsearch:7.3.0
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      - discovery.type=single-node
    restart: "no"
[root@cerebro ~]# docker-compose up -d  ##启动

#3.测试
[root@cerebro ~]# curl localhost:9200
{
  "name" : "fd12fa46332b",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "Rq5oEWaoShOdBe2FVwZ1fw",
  "version" : {
    "number" : "7.6.1",https://blog.csdn.net/qq_40907977/article/details/104743149
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "aa751e09be0a5072e8570670309b1f12348f023b",
    "build_date" : "2020-02-29T00:15:25.529771Z",
    "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"
}

#4.由于使用dokcer方式的服务启动,可以看到name被设定为启动的容器的hostname,cluster.name被设定为docker-cluster,从version中也可以看到ElasticSearch的版本信息,这样,可以用于验证ElasticSearch功能的环境就可以使用了。

ElasticHD

ElasticHD 支持 ES监控实时搜索Index template快捷替换修改索引列表信息查看, SQL converts to DSL工具等。是一款非常伴的 Dashboard。

项目地址:https://github.com/360EntSecGroup-Skylar/ElasticHD

ElasticHD Dashboard 展示

Elasticsearch部署及可视化工具_第1张图片Elasticsearch部署及可视化工具_第2张图片

 

Basic Usage

  • Linux and MacOS use ElasticHD
Step1: Download the corresponding elasticHD version,unzip xxx_elasticHd_xxx.zip
Step2: chmod 0777 ElasticHD
Step3: exec elastichd ./ElasticHD -p 127.0.0.1:9800 
  • windows
Step1: Download the corresponding elasticHD version,Double click zip package to unzip
Step2: exec elastichd ./ElasticHD -p 127.0.0.1:9800 

你可能感兴趣的:(java,elasticsearch,docker,大数据)