当前位置 知且行 php 正文 下一篇:

laravel安装elasticsearch

安装 java

  1. sudo yum -y install java

安装 es

  1. ~ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.4.tar.gz
  2. # 解压,进入目录
  3. elasticsearch-6.5.4 ./bin/elasticsearch

测试:

  1. elasticsearch-6.5.4 curl http://127.0.0.1:9200
  2. {
  3. "name" : "8-RxAep",
  4. "cluster_name" : "elasticsearch",
  5. "cluster_uuid" : "ewHMorMuTJ6CVVRUCiBQFg",
  6. "version" : {
  7. "number" : "6.5.4",
  8. "build_flavor" : "default",
  9. "build_type" : "tar",
  10. "build_hash" : "d2ef93d",
  11. "build_date" : "2018-12-17T21:17:40.758843Z",
  12. "build_snapshot" : false,
  13. "lucene_version" : "7.5.0",
  14. "minimum_wire_compatibility_version" : "5.6.0",
  15. "minimum_index_compatibility_version" : "5.0.0"
  16. },
  17. "tagline" : "You Know, for Search"
  18. }

安装 ik 插件:

elasticsearch-analysis-ik

releases 页面下载相应版本的zip包

解压zip包,重命名为 ik, 将目录放到 elasticsearch-6.5.4/plugins 中,重启es

查看已安装的插件:

  1. elasticsearch-6.5.4 ./bin/elasticsearch-plugin list
  2. ik

laravel安装es扩展

使用composer安装:

  1. composer require elasticsearch/elasticsearch '~6.0'
转载必须注明出处:https://www.zhiqiexing.com/67.html

关于我

我希望能成为一个认真、有趣、创造更多价值的人
关注微信
微信扫一扫关注我

微信扫一扫关注我

返回顶部