ElasticSearch5插件安装
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插件安装的更多相关文章
- elasticsearch5.0及head插件安装
这个瞎jb整了半天.准备把es2.4升级到5.0,结果老报错 环境:centos6.5+es2.4是ok的换成es5就出毛病.也不能说啥 ,我用的是最新的 源码解压启动时候报错,具体错误for ...
- windows 7 下elasticsearch5.0 安装head 插件
windows 7 下elasticsearch5.0 安装head 插件 elasticsearch5.0 和2有了很大的变化,以前的很多插件都有了变化比如 bigdesk head,以下是安装he ...
- [elk]elasticsearch5.0及head插件安装
ElasticSearch2.3/2.4升级到ElasticSearch5.0 参考文档(排名不分先后)https://www.elastic.co/guide/en/elasticsearch/re ...
- Elasticsearch5 及 head插件 安装说明
Elasticsearch5.X及 head插件 安装说明: 1.下载elasticsearch安装文件: a) 下载官方源码: https://artifacts.elastic.co/downlo ...
- elasticsearch及head插件安装与配置
1. 环境软件版本说明 系统:ubuntu14.04.1 JDK:1.8 elasticsearch:5.5.2 node:9.11.1 elasticsearch:5.X 2. 环境软件下载说明 1 ...
- ElasticSearch 5.0及head插件安装
一.elasticsearch安装配置 1.官网下载源码包 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.0 ...
- elasticsearch5.5安装
beat -------- kafka -------- logstash---------------elasticsearch--------------kibana beat配置文件 [roo ...
- ElasticSearch安装和head插件安装
本文主要介绍elasticsearch5.0安装及head插件安装.确保系统已经安装好jdk1.8以上,操作系统CentOS6以上. 一.elasticsearch安装配置 1.官网下载源码包 下载不 ...
- ElasticSearch5.3安装IK分词器并验证
ElasticSearch5.3安装IK分词器 之前使用Elasticsearch安装head插件成功了,但是安装IK分词器却失败了.貌似是ElasticSearch5.0以后就不支持直接在elast ...
随机推荐
- webstorm中使用git
webstorm中使用git将代码放入tfs两种方式: 直接在tfs上建立仓库,复制仓库地址,然后在本地打开webstorm,然后git克隆这个仓库 使用git命令将本地项目上传到tfs git re ...
- js前台实现上传图片的预览
网上这样的插件一大堆,不过还是谈下js下代码的实现,加深这方面的理解. 当然也没有一种方式就可以完事的情形,主要就两种方面来处理: 1.file API的filereader接口完成(支持的浏览器:I ...
- 使用Python批量合并PDF文件(带书签功能)
网上找了几个合并pdf的软件,发现不是很好用,一般都没有添加书签的功能. 又去找了下python合并pdf的脚本,发现也没有添加书签的功能的. 于是自己动手编写了一个小工具,使用了PyPDF2. 下面 ...
- msvcr100.dll丢失原因及解决方法
msvcr100.dll为Visual Studio 2010的一个动态链接库,如果某程序是用它开发出来的,那么该程序的运行就有可能需要此动态链接库.有些程序直接将其打包到了安装目录,并注册,就不会出 ...
- np.arrange用法
np.arange()经常用,其用法总结如下: np.arange(0,60,2) 生成从0到60的步距为2的数组,其中0为初始值,60为终值,2步距, np.arange(60) 生成从0到59的默 ...
- node-7.2.1 already installed, it's just not linked
直接在terminal下运行以卸载node和nvm: sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,shar ...
- [原]Linux 修改时区
1.查看当前时区 date -R 2.修改当前时区 tzselect 之后会出来一个选项菜单,选择你想要的时区就OK了 3.替换系统时区文件 cp /usr/share/zoneinfo/XXX/YY ...
- MATLAB入门学习(二)
关于矩阵 ~o( =∩ω∩= )m matlab矩阵运算很强大 ,几乎所有涉及矩阵运算的命令都有. 事实上,matlab里面所有变量都是以矩阵的形式保存下来的. 一个数字是1x1矩阵 我们来看看矩阵的 ...
- UVa 12034 - Race(递推 + 杨辉三角)
链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...
- BZOJ2301:[HAOI2011]Problem b(莫比乌斯反演,容斥)
Description 对于给出的n个询问,每次求有多少个数对(x,y),满足a≤x≤b,c≤y≤d,且gcd(x,y) = k,gcd(x,y)函数为x和y的最大公约数. Input 第一行一个整数 ...