Mac下ElasticSearch安装

Elasticsearch是一个基于Apache Lucene(TM)的开源搜索引擎。无论在开源还是专有领域,Lucene可以被认为是迄今为止最先进、性能最好的、功能最全的搜索引擎库。

下面介绍一下Mac下安装Elasticsearch的步骤

更新brew

brew update

安装java8

brew cask install homebrew/cask-versions/java8

运行es必须安装java

安装es

brew install elasticsearch

你也可以先brew search elasticsearch

运行es

brew services start elasticsearch

查看安装信息执行 brew info elasticsearch

本地浏览器访问http://localhost:9200

{
    name: "90LNUen",
    cluster_name: "elasticsearch_shengyulong",
    cluster_uuid: "vMztQUmQS7-_aJ1b37URYg",
    version: {
        number: "6.6.2",
        build_flavor: "oss",
        build_type: "tar",
        build_hash: "3bd3e59",
        build_date: "2019-03-06T15:16:26.864148Z",
        build_snapshot: false,
        lucene_version: "7.6.0",
        minimum_wire_compatibility_version: "5.6.0",
        minimum_index_compatibility_version: "5.0.0",
    },
    tagline: "You Know, for Search",
}

安装Kibana

KibanaES的一个配套工具,可以让用户在网页中与ES进行交互

brew install kibana

启动Kibana

brew services start kibana

本地浏览器访问

http://localhost:5601

查看集群健康状态

屏幕快照 2019-03-28 上午9.55.40.png

localhost:9200/_cat/health?v

注意看 status字段,他有三个值含义分别如下

  • green:一切都很好(集群功能齐全)
  • yellow:所有数据都可用,但尚未分配一些副本(群集功能齐全)
  • Red:某些数据由于某种原因不可用(群集部分功能)

你可能感兴趣的:(Mac下ElasticSearch安装)