文档详情

elasticsearch5-0安装head插件.doc

发布:2017-04-17约3.8千字共9页下载文档
文本预览下载声明
编号: 版本:A/1 Confidential? DOCPROPERTY Company \* MERGEFORMAT 6x0s0p0XfCLJ1bBQ0IWb, 2013Page  PAGE 9  HYPERLINK /xing901022/p/6030296.html Elasticsearch 5.0 —— Head插件部署指南 使用ES的基本都会使用过head,但是版本升级到5.0后,head插件就不好使了。下面就看看如何在5.0中启动Head插件吧!  HYPERLINK /mobz/elasticsearch-head \l running-with-built-in-server 官方粗略教程 Running with built in server enable cors by adding http.cors.enabled: true in elasticsearch configuration. Don’t forget to also set http.cors.allow-origin because no origin allowed by default. http.cors.allow-origin: * is valid value, however it’s considered as a security risk as your cluster is open to cross origin from anywhere.  HYPERLINK https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html \l modules-http Check Elasticsearch documentation on this parameter: git clone git:///mobz/elasticsearch-head.git cd elasticsearch-head npm install grunt server open? HYPERLINK http://localhost:9100/ http://localhost:9100/ This will start a local webserver running on port 9100 serving elasticsearch-head Best option if you are likely to connect to several different clusters 部署5.0版本的ES 5.0版本的ES跟之前的版本最大的不同之处就是多了很多环境的校验,比如jdk,max-files等等。 设置内核参数 vi /etc/sysctl.conf # 增加下面的内容 fs.file-max=65536 vm.max_map_count=262144 设置资源参数 vi /etc/security/limits.conf # 修改 * soft nofile 32768 * hard nofile 65536 修改进程数 ulimit -u 2048 修改elasticsearch的参数 修改一下es使用的参数: # 换个集群的名字,免得跟别人的集群混在一起 : es-5.0-test # 换个节点名字 : node-101 # 修改一下ES的监听地址,这样别的机器也可以访问 network.host: # 默认的就好 http.port: 9200 # 增加新的参数,这样head插件可以访问es http.cors.enabled: true http.cors.allow-origin: * 注意,设置参数的时候:后面要有空格! 安装部署head 第一步,安装git 需要从github上面下载代码,因此先要安装git yum -y install git 安装完成后,就可以直接下载代码了: git clone git:///mobz/elasticsearch-head.git 下载后,修改下777权限(简单粗暴),因为是独立启动head的,所以随便放一个位置就行了,参考: /usr/elk/head/***** 第二步,安装node 由于head插件本质上还是一个nodejs的工程,因此需要安装node,使用npm来安装依赖的包。(npm可以理解为maven) 去官网下载nodejs, HYPERLINK /en/download/ /en/download
显示全部
相似文档