Centos 7 安装 Elasticsearch 全文搜索

本帖由 Xiao.T2015-03-25 发布。版面名称:服务器/环境搭建

  1. Xiao.T

    Xiao.T 管理员 技术员

    Centos 7 安装 Elasticsearch
    需要JAVA JDK 自行安装
    Elasticsearch rpm下载地址: https://www.elastic.co/downloads/elasticsearch
    代码:
    wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.0.noarch.rpm
    安装
    rpm i elasticsearch-1.5.0.noarch.rpm
    编辑配置
    vim /etc/elasticsearch/elasticsearch.yml
    
    开启端口
    http.port: 9200
    
    
    重新启动 service elasticsearch restart

    测试
    curl -XGET http://localhost:9200/_cluster/health?pretty=true
    代码:
    {
      "cluster_name" : "xf",
      "status" : "yellow",
      "timed_out" : false,
      "number_of_nodes" : 1,
      "number_of_data_nodes" : 1,
      "active_primary_shards" : 5,
      "active_shards" : 5,
      "relocating_shards" : 0,
      "initializing_shards" : 0,
      "unassigned_shards" : 5,
      "number_of_pending_tasks" : 0
    }
     
正在加载...