mac安装elasticsearch步骤

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/haiyu94/article/details/83106406

1. java环境

安装包下载地址:https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
下载对应的macos版本,按步骤安装即可。
检查是否安装成功,命令行输入:

java -version

若输出对应的java版本号等信息即为安装成功。

2. brew 安装elasticsearch

命令行输入:

brew update
brew install elasticsearch

安装过程遇到问题:

==> Downloading https://artifacts.elastic.co/downloads/elasticsearch/elasticsear
######################################################################## 100.0%
Error: parent directory is world writable but not sticky
Please report this bug:
  https://docs.brew.sh/Troubleshooting

解决方法:

cd /private/
sudo chmod +t /tmp

重新执行命令:

brew install elasticsearch

即可安装成功。

3. 检验

命令行输入:

elasticsearch

启动服务

在浏览器输入:

http://127.0.0.1:9200/

浏览器返回如下json文件:

{
  "name" : "O3vUGw5",
  "cluster_name" : "elasticsearch_admin",
  "cluster_uuid" : "I1QOrMlJSGO9I6t_IUrSgw",
  "version" : {
    "number" : "6.4.2",
    "build_flavor" : "oss",
    "build_type" : "tar",
    "build_hash" : "04711c2",
    "build_date" : "2018-09-26T13:34:09.098244Z",
    "build_snapshot" : false,
    "lucene_version" : "7.4.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

猜你喜欢

转载自blog.csdn.net/haiyu94/article/details/83106406