码迷,mamicode.com
首页 > 系统相关 > 详细

ElasticSearch(三)mac安装

时间:2018-12-12 10:35:01      阅读:402      评论:0      收藏:0      [点我收藏+]

标签:集群   tag   star   jps   flavor   snap   安装jdk   serve   search   

1.首先要安装jdk

2.到官网或是用brew下载ElasticSearch 安装包,这边我们选择在官网下载对应的安装包 https://www.elastic.co/cn/downloads/elasticsearch

3.解压缩到对应的目录下,我们解压缩到了 /usr/local/elasticsearch-6.5.2

解压缩后的相关目录如下:

技术分享图片

4.快速启动

1).进入到bin目录下,执行elasticsearch脚本,sh elasticsearch 或 ./elasticsearch

2).我们可以看到started关键字,表示已经启动成功,绑定端口为9200

[2018-12-12T09:36:45,853][INFO ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [PX7a_3A] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200}

[2018-12-12T09:36:45,854][INFO ][o.e.n.Node ] [PX7a_3A] started

3).查看es jvm进程

? ~ jps -l |grep Elasticsearch
1052 org.elasticsearch.bootstrap.Elasticsearch

4).或是我们可以用curl http://localhost:9200/?pretty检查是否启动成功

? ~ curl http://localhost:9200/\?pretty
{
"name" : "PX7a_3A",
"cluster_name" : "elasticsearch",  //集群名称(默认的集群名称就是elasticsearch)
"cluster_uuid" : "mnnG3X4aSpakShysGdqy0w",
"version" : {
"number" : "6.5.2",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "9434bed",
"build_date" : "2018-11-29T23:58:20.891072Z",
"build_snapshot" : false,
"lucene_version" : "7.5.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}

5).我们发现control+c停止了Elasticsearch,有closed关键字,所以要进行后台启动

[2018-12-12T09:48:36,732][INFO ][o.e.n.Node ] [PX7a_3A] stopped
[2018-12-12T09:48:36,732][INFO ][o.e.n.Node ] [PX7a_3A] closing ...
[2018-12-12T09:48:36,747][INFO ][o.e.n.Node ] [PX7a_3A] closed

6).后台启动Elasticsearch

执行命令 sh elasticsearch -d

 

ElasticSearch(三)mac安装

标签:集群   tag   star   jps   flavor   snap   安装jdk   serve   search   

原文地址:https://www.cnblogs.com/ql211lin/p/10106723.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!