mac下elasticsearch安装部署

  • 下载elaticsearch集成包

优势:封装了对插件的支持,且安装方式较简单

地址:https://github.com/medcl/elasticsearch-rtf

解压到指定目录后,获取该集成包所支持的插件列表

bin/elasticsearch-plugin list
  • 删除多余插件

这其中,大多数插件一般都用不上的,因此会浪费一些内存空间

bin/elasticsearch-plugin list > /tmp/plugin.log   //将插件列表导入到临时文件log中
vim /tmp/plugin.log                   //打开log文件,小编仅需analysis-ik中文插件,所以,就将此项从log文件中删除
cat /tmp/plugin.log|xargs -I {} bin/elasticsearch-plugin remove {}  //将log中插件从elasticsearch中移除
  • 启动elasticsearch

bin/elasticsearch -d

报错解决:

Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

这是因为JDK版本过高导致的,本机使用JDK11。

那就下载JDK8使用来解决此问题了。

继续启动elasticsearch

  • 验证

验证是否启动正常,通过log查看,可访问地址为 http://127.0.0.1:9200/

猜你喜欢

转载自www.cnblogs.com/wanghaokun/p/10090320.html