您的位置 首页 php

laravel安装elasticsearch

安装 java

sudo yum -y install java

安装 es

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

测试:

➜  elasticsearch-6.5.4 curl http://127.0.0.1:9200
{
  "name" : "8-RxAep",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "ewHMorMuTJ6CVVRUCiBQFg",
  "version" : {
    "number" : "6.5.4",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "d2ef93d",
    "build_date" : "2018-12-17T21:17:40.758843Z",
    "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"
}

安装 ik 插件:

elasticsearch-analysis-ik

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

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

查看已安装的插件:

➜  elasticsearch-6.5.4 ./bin/elasticsearch-plugin list
ik

laravel安装es扩展

使用composer安装:

composer require elasticsearch/elasticsearch '~6.0'
本文由钟森龙创作,转载请注明出处:http://zhiqiexing.com/67.html
关注微信
微信扫码关注

微信扫一扫关注我

返回顶部