Elasticsearch集群搭建

Elasticsearch集群

【问题总结】

 

 

http://blog.sina.com.cn/s/blog_c90ce4e001032f7w.html

https://zhuanlan.zhihu.com/p/22241634?refer=dataeye

 

 

1.max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

 

#切换到root用户修改

vim /etc/security/limits.conf

 

# 在最后面追加下面内容

*** hard nofile 65536

*** soft nofile 65536

 

***  是启动ES的用户

 

2.max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

 

# 执行以下命令,查看当前vm.max_map_count

sysctl –a | grep “vm.max_map_count”

# 修改当前vm.max_map_count

sysctl -w vm.max_map_count=655360

 

访问es,访问ip:9200出现

{

  "name" : "node-100",

  "cluster_name" : "CollectorDBCluster",

  "cluster_uuid" : "easuMUSkS8uet3aM5n5osg",

  "version" : {

    "number" : "5.6.8",

    "build_hash" : "688ecce",

    "build_date" : "2018-02-16T16:46:30.010Z",

    "build_snapshot" : false,

    "lucene_version" : "6.6.1"

  },

  "tagline" : "You Know, for Search"

}

【关于插件】

 

在ES的以往各个版本中都支持一个比较好用的插件 mobz/elasticsearch-head

 

但是ES5.0版本还不支持plugin安装,详情请查看 GitHub - mobz/elasticsearch-head: A web front end for an elastic search cluster

 

删除es索引

删除指定索引:curl -XDELETE http://localhost:9200/twitter 

删除多个索引:curl -XDELETE http://localhost:9200/twitter,my_index

删除所有索引:curl -XDELETE http://localhost:9200/_all 或 curl -XDELETE http://localhost:9200/*

安全起见,禁用全删和通配符:action.destructive_requires_name = true

posted @ 2018-06-01 17:11  Max-Jiang  阅读(148)  评论(0编辑  收藏  举报