1. 下载地址:
    # elasticsearch 下载地址
    https://www.elastic.co/cn/downloads/elasticsearch
    # IK 项目地址
    https://github.com/medcl/elasticsearch-analysis-ik/
  2. 安装 elasticsearch(略):
  3. 安装 中文分词 插件 - IK(略):
  4. 配置集群:
    vim /etc/elasticsearch/elasticsearch.yml
    cluster.name: app
    node.name: master
    network.host: 192.168.0.11
    http.port: 9200
    discovery.seed_hosts: ["192.168.0.11", "192.168.0.12"]
    cluster.initial_master_nodes: ["master", "slave"]
    node.master: true
    node.data: true
    http.cors.enabled: true
    http.cors.allow-origin: "*"
    ######## begin: 用户名/密码 配置 ########
    http.cors.allow-headers: Authorization
    xpack.security.enabled: true
    xpack.security.transport.ssl.enabled: true
    ######## end: 用户名/密码 配置 ########
    discovery.zen.minimum_master_nodes: 2
    path.data: /var/lib/elasticsearch
    path.logs: /var/log/elasticsearch
  5. 设置 用户名/密码:
    /usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive
  6. web 访问地址:
    localhost:9200
文档更新时间: 2021-03-28 09:36   作者:lee