1. http://blog.csdn.net/napoay/article/details/53896348
  2.  
  3. #更新
  4. sudo yum update -y
  5.  
  6. sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  7. sudo rpm -ivh https://kojipkgs.fedoraproject.org//packages/http-parser/2.7.1/3.el7/x86_64/http-parser-2.7.1-3.el7.x86_64.rpm
  8.  
  9. sudo yum install npm
  10.  
  11. sudo yum install -y git
  12.  
  13. sudo yum install -y bzip2
  14.  
  15. git clone git://github.com/mobz/elasticsearch-head.git
  16.  
  17. #将源码包下载后剪切到/bigdata目录,并改所属用户和组
  18. sudo chown -R xiaoniu:xiaoniu /bigdata/elasticsearch-head
  19.  
  20. #进入到elasticsearch-head中
  21. cd elasticsearch-head
  22. #编译安装
  23. npm install
  24.  
  25. 打开elasticsearch-head-master/Gruntfile.js,找到下面connect属性,新增hostname: '0.0.0.0',
  26. connect: {
  27. server: {
  28. options: {
  29. hostname: '0.0.0.0',
  30. port: ,
  31. base: '.',
  32. keepalive: true
  33. }
  34. }
  35. }
  36.  
  37. 编辑elasticsearch-5.4./config/elasticsearch.yml,加入以下内容:
  38. http.cors.enabled: true
  39. http.cors.allow-origin: "*"
  40.  
  41. #运行服务
  42. npm run start
  43.  
  44. ---------------------------------------------------------------------------------------------
  45.  
  46. 安装IK分词器
  47. 下载对应版本的插件
  48. https://github.com/medcl/elasticsearch-analysis-ik/releases
  49.  
  50. 首先下载es对应版本的ik分词器的zip包,上传到es服务器上,在es的安装目录下有一个plugins的目录,在这个目录下创建一个叫ik的目录
  51. 然后将解压好的内容,拷贝到ik目录
  52. ik目录拷贝到其他的es节点
  53. 重新启动所有的es
  54.  
  55. #创建索引名字叫news
  56. curl -XPUT http://192.168.100.211:9200/news
  57.  
  58. #创建mapping(相当于数据中的schema信息,表名和字段名以及字段的类型)
  59. curl -XPOST http://192.168.100.211:9200/news/fulltext/_mapping -d'
  60. {
  61. "properties": {
  62. "content": {
  63. "type": "text",
  64. "analyzer": "ik_max_word",
  65. "search_analyzer": "ik_max_word"
  66. }
  67. }
  68.  
  69. }'
  70.  
  71. curl -XPOST http://192.168.100.211:9200/news/fulltext/1 -d'
  72. {"content":"美国留给伊拉克的是个烂摊子吗"}'
  73.  
  74. curl -XPOST http://192.168.100.211:9200/news/fulltext/2 -d'
  75. {"content":"公安部:各地校车将享最高路权"}'
  76.  
  77. curl -XPOST http://192.168.100.211:9200/news/fulltext/3 -d'
  78. {"content":"中韩渔警冲突调查:韩警平均每天扣1艘中国渔船"}'
  79.  
  80. curl -XPOST http://192.168.100.211:9200/news/fulltext/4 -d'
  81. {"content":"中国驻洛杉矶领事馆遭亚裔男子枪击 嫌犯已自首"}'
  82.  
  83. curl -XPOST http://192.168.100.211:9200/news/fulltext/_search -d'
  84. {
  85. "query" : { "match" : { "content" : "中国" }},
  86. "highlight" : {
  87. "pre_tags" : ["<font color='red'>", "<tag2>"],
  88. "post_tags" : ["</font>", "</tag2>"],
  89. "fields" : {
  90. "content" : {}
  91. }
  92. }
  93. }'
  94.  
  95. -------------------------------------------------------------------
  96.  
  97. curl -XGET 'http://192.168.100.211:9200/_analyze?pretty&analyzer=ik_max_word' -d '联想是全球最大的笔记本厂商'
  98.  
  99. curl -XGET 'https://192.168.100.211:9200/_analyze?pretty&analyzer=ik_smart' -d '联想是全球最大的笔记本厂商'
  100.  
  101. curl -XPUT 'https://192.168.100.211:9200/iktest?pretty' -d '{
  102. "settings" : {
  103. "analysis" : {
  104. "analyzer" : {
  105. "ik" : {
  106. "tokenizer" : "ik_max_word"
  107. }
  108. }
  109. }
  110. },
  111. "mappings" : {
  112. "article" : {
  113. "dynamic" : true,
  114. "properties" : {
  115. "subject" : {
  116. "type" : "string",
  117. "analyzer" : "ik_max_word"
  118. }
  119. }
  120. }
  121. }
  122. }'
  123.  
  124. curl -XPUT 'https://192.168.100.211:9200/iktest?pretty' -d '{
  125. "settings" : {
  126. "analysis" : {
  127. "analyzer" : {
  128. "ik" : {
  129. "tokenizer" : "ik_max_word"
  130. }
  131. }
  132. }
  133. },
  134. "mappings" : {
  135. "article" : {
  136. "dynamic" : true,
  137. "properties" : {
  138. "subject" : {
  139. "type" : "string",
  140. "analyzer" : "ik_max_word"
  141. }
  142. }
  143. }
  144. }
  145. }'
  146.  
  147. curl -XGET 'http://192.168.10.16:9200/_analyze?pretty&analyzer=ik_max_word' -d ‘中华人民共和国’
  148.  
  149. ---------------------------------------------------------------------------------------------
  150.  
  151. es安装SQL插件
  152. ./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.3.0/elasticsearch-sql-5.4.3.0.zip
  153.  
  154. #然后将解压到plugins目录下的内容拷贝到其他es的节点的plugins目录
  155.  
  156. 下载SQLServer
  157. wget https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.1.0/es-sql-site-standalone.zip
  158.  
  159. npm编译安装
  160. unzip es-sql-site-standalone.zip
  161. cd site-server/
  162. npm install express --save
  163.  
  164. 修改SQLServer的端口
  165. vi site_configuration.json
  166. 启动服务
  167. node node-server.js &

ElasticSearch5插件安装的更多相关文章

  1. elasticsearch5.0及head插件安装

        这个瞎jb整了半天.准备把es2.4升级到5.0,结果老报错 环境:centos6.5+es2.4是ok的换成es5就出毛病.也不能说啥 ,我用的是最新的 源码解压启动时候报错,具体错误for ...

  2. windows 7 下elasticsearch5.0 安装head 插件

    windows 7 下elasticsearch5.0 安装head 插件 elasticsearch5.0 和2有了很大的变化,以前的很多插件都有了变化比如 bigdesk head,以下是安装he ...

  3. [elk]elasticsearch5.0及head插件安装

    ElasticSearch2.3/2.4升级到ElasticSearch5.0 参考文档(排名不分先后)https://www.elastic.co/guide/en/elasticsearch/re ...

  4. Elasticsearch5 及 head插件 安装说明

    Elasticsearch5.X及 head插件 安装说明: 1.下载elasticsearch安装文件: a) 下载官方源码: https://artifacts.elastic.co/downlo ...

  5. elasticsearch及head插件安装与配置

    1. 环境软件版本说明 系统:ubuntu14.04.1 JDK:1.8 elasticsearch:5.5.2 node:9.11.1 elasticsearch:5.X 2. 环境软件下载说明 1 ...

  6. ElasticSearch 5.0及head插件安装

    一.elasticsearch安装配置 1.官网下载源码包 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.0 ...

  7. elasticsearch5.5安装

    beat --------  kafka -------- logstash---------------elasticsearch--------------kibana beat配置文件 [roo ...

  8. ElasticSearch安装和head插件安装

    本文主要介绍elasticsearch5.0安装及head插件安装.确保系统已经安装好jdk1.8以上,操作系统CentOS6以上. 一.elasticsearch安装配置 1.官网下载源码包 下载不 ...

  9. ElasticSearch5.3安装IK分词器并验证

    ElasticSearch5.3安装IK分词器 之前使用Elasticsearch安装head插件成功了,但是安装IK分词器却失败了.貌似是ElasticSearch5.0以后就不支持直接在elast ...

随机推荐

  1. git rebase --onto详解

    https://blog.pivotal.io/labs/labs/git-rebase-onto http://www.cnblogs.com/rickyk/p/3848768.html

  2. notepad ++ 编辑 powershell profile 文件时的诡异问题

    使用notepad 编辑 C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1 时,记事本打开和用notepad++打开显示的内容居然不一样. ...

  3. Infragist ics Ult imate 2015 Vol.1 - Product Keys

    Ultimate ProductKeys 2015 Vol.1: 9122-1900164-4504144 9122-9300855-3994197 9122-7600717-4579130 9122 ...

  4. (转)从Python的0.1输出0.1000000000000001说浮点数的二进制

    原文地址:http://blog.csdn.net/u012843100/article/details/60885763 今天在学习Python核心编程的时候,十进制浮点数那段看到一个有趣的事情. ...

  5. linux开机启动脚本

    linux开机启动脚本 linux 开机启动脚本 用户自定义开机程序(/etc/rc.d/rc.local) 操作最简单,方便.每次都自己启动PHP啊,Nginx啊 烦死了,其他方式还要弄shell啊 ...

  6. python 线程中的局部变量ThreadLocal

    一个线程使用自己的局部变量比使用全局变量好局部变量只有线程自己能看见,不会影响其他线程全局变量的修改必须加锁 ThreadLocal 线程局部变量 import threading # 创建全局Thr ...

  7. 如何在 MSBuild Target(Exec)中报告编译错误和编译警告

    编译错误和编译警告 MSBuild 的 Exec 自带有错误和警告的标准格式,按照此格式输出,将被识别为编译错误和编译警告. 而格式只是简简单单的 error: 开头或者 warning: 开头.冒号 ...

  8. IntelliJ IDEA 2017.3-2018.1 全系列汉化包

    JetBrains 系列软件汉化包 关键字: Android Studio 3.0-3.1 汉化包 GoLand 2017.3.2-2018.1 汉化包 IntelliJ IDEA 2017.3-20 ...

  9. 备份&添加无线网络配置

    netsh wlan export profile key=clear folder=c:\ #备份 (ls c:\*.xml).FullName|%{netsh wlan add profile f ...

  10. sort论文和代码解读

    流程:1.detections和trackers用匈牙利算法进行匹配 2.把匹配中iou < 0.3的过滤成没匹配上的(1.2步共同返回匹配上的,没匹配上的trackers,没匹配上的detec ...