首页 > 代码库 > Mac下安装ElasticSearch

Mac下安装ElasticSearch

简单记录一下安装ES的过程,给小小白们提供一下参考:

下载安装包

https://www.elastic.co/downloads/elasticsearch
建议下载2.3.2版本,最新的5.0.0版本与可视化话工具elasticsearch-head可能不太兼容

解压运行

cd到安装目录
sudo bin/elasticsearch

验证

浏览器中访问http://localhost:9200/,看到一个json结果集,表明安装成功:

{
  "name" : "The Destroyer",
  "cluster_name" : "elasticsearch",
  "version" : {
     "number" : "2.3.2",
     "build_hash" :        "b9e4a6acad4008027e4038f6abed7f7dba346f94",
     "build_timestamp" : "2016-04-21T16:03:47Z",
     "build_snapshot" : false,
     "lucene_version" : "5.5.0"
  },
  "tagline" : "You Know, for Search"
}

  

插件安装

这里推荐使用elasticsearch-head
sudo bin/plugin install mobz/elasticsearch-head
重启ES,浏览器中访问http://localhost:9200/_plugin/head/,验证是否成功:

Mac下安装ElasticSearch