http://blog.csdn.net/napoay/article/details/53896348

#更新
sudo yum update -y sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
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 sudo yum install npm sudo yum install -y git sudo yum install -y bzip2 git clone git://github.com/mobz/elasticsearch-head.git #将源码包下载后剪切到/bigdata目录,并改所属用户和组
sudo chown -R xiaoniu:xiaoniu /bigdata/elasticsearch-head #进入到elasticsearch-head中
cd elasticsearch-head
#编译安装
npm install 打开elasticsearch-head-master/Gruntfile.js,找到下面connect属性,新增hostname: '0.0.0.0',
connect: {
server: {
options: {
hostname: '0.0.0.0',
port: ,
base: '.',
keepalive: true
}
}
} 编辑elasticsearch-5.4./config/elasticsearch.yml,加入以下内容:
http.cors.enabled: true
http.cors.allow-origin: "*" #运行服务
npm run start --------------------------------------------------------------------------------------------- 安装IK分词器
下载对应版本的插件
https://github.com/medcl/elasticsearch-analysis-ik/releases 首先下载es对应版本的ik分词器的zip包,上传到es服务器上,在es的安装目录下有一个plugins的目录,在这个目录下创建一个叫ik的目录
然后将解压好的内容,拷贝到ik目录
将ik目录拷贝到其他的es节点
重新启动所有的es #创建索引名字叫news
curl -XPUT http://192.168.100.211:9200/news #创建mapping(相当于数据中的schema信息,表名和字段名以及字段的类型)
curl -XPOST http://192.168.100.211:9200/news/fulltext/_mapping -d'
{
"properties": {
"content": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_max_word"
}
} }' curl -XPOST http://192.168.100.211:9200/news/fulltext/1 -d'
{"content":"美国留给伊拉克的是个烂摊子吗"}' curl -XPOST http://192.168.100.211:9200/news/fulltext/2 -d'
{"content":"公安部:各地校车将享最高路权"}' curl -XPOST http://192.168.100.211:9200/news/fulltext/3 -d'
{"content":"中韩渔警冲突调查:韩警平均每天扣1艘中国渔船"}' curl -XPOST http://192.168.100.211:9200/news/fulltext/4 -d'
{"content":"中国驻洛杉矶领事馆遭亚裔男子枪击 嫌犯已自首"}' curl -XPOST http://192.168.100.211:9200/news/fulltext/_search -d'
{
"query" : { "match" : { "content" : "中国" }},
"highlight" : {
"pre_tags" : ["<font color='red'>", "<tag2>"],
"post_tags" : ["</font>", "</tag2>"],
"fields" : {
"content" : {}
}
}
}' ------------------------------------------------------------------- curl -XGET 'http://192.168.100.211:9200/_analyze?pretty&analyzer=ik_max_word' -d '联想是全球最大的笔记本厂商' curl -XGET 'https://192.168.100.211:9200/_analyze?pretty&analyzer=ik_smart' -d '联想是全球最大的笔记本厂商' curl -XPUT 'https://192.168.100.211:9200/iktest?pretty' -d '{
"settings" : {
"analysis" : {
"analyzer" : {
"ik" : {
"tokenizer" : "ik_max_word"
}
}
}
},
"mappings" : {
"article" : {
"dynamic" : true,
"properties" : {
"subject" : {
"type" : "string",
"analyzer" : "ik_max_word"
}
}
}
}
}' curl -XPUT 'https://192.168.100.211:9200/iktest?pretty' -d '{
"settings" : {
"analysis" : {
"analyzer" : {
"ik" : {
"tokenizer" : "ik_max_word"
}
}
}
},
"mappings" : {
"article" : {
"dynamic" : true,
"properties" : {
"subject" : {
"type" : "string",
"analyzer" : "ik_max_word"
}
}
}
}
}' curl -XGET 'http://192.168.10.16:9200/_analyze?pretty&analyzer=ik_max_word' -d ‘中华人民共和国’ --------------------------------------------------------------------------------------------- es安装SQL插件
./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.3.0/elasticsearch-sql-5.4.3.0.zip #然后将解压到plugins目录下的内容拷贝到其他es的节点的plugins目录 下载SQL的Server
wget https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.1.0/es-sql-site-standalone.zip 用npm编译安装
unzip es-sql-site-standalone.zip
cd site-server/
npm install express --save 修改SQL的Server的端口
vi site_configuration.json
启动服务
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. mac 修改MAC代码

    1.生成一个mac地址: openssl rand -hex | sed 's/\(..\)/\1:/g; s/.$//' 2.关闭无线 sudo /System/Library/PrivateFra ...

  2. 如何为运行的 ARM Linux 启用 LAD2.3 版本的诊断扩展

    Linux Azure Diagnostic (LAD) 扩展现在已经发布了 3.0 版本,但在 Azure 中国区,目前可用的最新版本还是 2.3. 虽然 Azure 门户提供了简单的操作版本为 L ...

  3. dctcp example-ns2

    set N 8 set B 250 set K 65 set RTT 0.0001 set simulationTime 1.0 set startMeasurementTime 1 set stop ...

  4. Oracle案例07——ORA-28000: the account is locked

    遇到这个错误,一般我们想到的是数据库用户被锁,只需要执行用户解锁即可恢复,但这里之所以写出来是因为比较奇葩的一个问题. 昨天下午接同事信息,说一个用户连接报被锁,经过沟通发现其实连接一个ADG的备库作 ...

  5. Go语言 map遍历

    1 遍历顺序 Go语言里的map,是不保证遍历顺序的(这一点很好理解).甚至同样内容的map,两次遍历的顺序,也可能不一样.下面是一个例子: m := map[string]int{"a1& ...

  6. vscode:解决操作git总让输入用户名及密码问题

    只要是使用git操作,不管是同步,拉去,克隆,vscode总让我们输入用户名及密码,是一件很繁琐的事情 我们打开终端,会看到cmd定位在我们仓库位置,我们只要添加:git config --globa ...

  7. June 29th 2017 Week 26th Thursday

    Hope for the best, but prepare for the worst. 做最好的期望,做最坏的打算. Always remember that quotes about being ...

  8. Java实现身份证号码验证源码分享

    import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; impor ...

  9. TraceWrite waittype

    今天上午突然开发人员叫起来说数据库非常慢,马上连上数据查看. 使用sp_who2和下面脚本可以看到大量的TraceWrite 等待事件.我的第一反应就是有人启用的Profiler在生产服务器上抓数据了 ...

  10. luogu P4135 作诗

    嘟嘟嘟 郑重声明:我的前几到分块题写法上都有点小毛病,以这篇为主! 这道题感觉也是分块的基本套路,只不过卡常,得开氧气. 维护俩:sum[i][j]表示前 i 块中,数字 j 出现了多少次,ans[i ...