使用docker pull elasticSearch 對象
elastic 官網(wǎng)docker安裝文檔
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
1.docker pull docker.elastic.co/elasticsearch/elasticsearch:7.9.2
(版本號可以在官網(wǎng)指定)
2.docker run -d --name es2 -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" 5acf0e8da90b
運行容器
3.docker exec -it es2 /bin/bash
進入容器
- cd config 進入配置文件目錄
5.yum install vim -y 下載vim
6.vim elasticSearch.yml 進行配置’
7.增加內容
cluster.name: "qfcwx-cluster"
network.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"
8.exit 退出容器 docker restart es2 重啟容器
9.阿里云 開啟9200安全組 訪問 ip:9200
谷歌插件 ElasticSearch Head
-百度 google-helper 安裝擴展程序
-開啟后 進入谷歌應用商店 搜索 ElasticSearch Head
-安裝 ok

elasticSearch-head.png