# 下載包
https://www.elastic.co/downloads/past-releases/elasticsearch-6-0-1
https://github.com/mobz/elasticsearch-head
# 本地安裝
## 安裝elasticsearch
1. 拷貝到目錄 /home/xx/runtime/elasticsearch-home
2. 修改配置文件conf/elasticsearch.yaml,修改一下幾列(非必須):
cluster.name: my-application
node.name: node-1
node.attr.rack: r1
3. 修改配置文件conf/elasticsearch.yaml, 增加兩列(否则elasticsearch-head无法访问)
http.cors.enabled: true
http.cors.allow-origin: "*"
4. 启动集群
$bin/elasticsearch -d
5. 访问http://localhost:9200,确认服务已经启动
6. 查看日志 logs/my-application.log
##安装elasticsearch-head
1. 拷贝目录到
拷貝到目錄 /home/xx/runtime/elasticsearch-head
2. cd elasticsearch-head && npm install && npm run start
3. 访问 http://localhost:9100,确认服务已经启动
# 基本操作
## 創建索引
## 插入數據
## 基本查詢