一、安装elasticsearch

1.首先需要安装好java,并配置好环境变量,详细教程请看

http://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/#

2.安装ElasticSearch,下载rpm包:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.1.1.rpm

rpm -ivh elasticsearch-5.1.1.rpm

3.修改elasticsearch的配置文件:

 vi /etc/elasticsearch/elasticsearch.yml

修改其中的network.host为本机ip,http.port为9200

4.安装成功后,启动elasticsearch:

systemctl daemon-reload 
    systemctl enable elasticsearch.service (设置开机自启动)
    systemctl start elasticsearch.service (开启服务) 
    systemctl status elasticsearch.service (查看服务状态)

检查是否成功:curl http://*****:9200

二、安装ik分词器

1、进入https://github.com/medcl/elasticsearch-analysis-ik/,找到ik分词器对应的版本为5.1.1,直接下载其release的版本(避免maven打包);

2、在/usr/share/elasticsearch/plugins下建立ik目录:

mkdir /usr/share/elasticsearch/plugins/ik

3、复制文件至elasticsearch的plugins文件夹的ik文件夹下:

cp  elasticsearch-analysis-ik-5.1.1.zip  /usr/share/elasticsearch/plugins/ik

4.解压文件:

unzip elasticsearch-analysis-ik-5.1.1.zip

三、安装HEAD插件

1、安装node.js,去官网下载nodejs,https://nodejs.org/en/download/

2、下载下来的jar包是xz格式的,一般的linux可能不识别,还需要安装xz.

yum -y install xz

3、然后解压nodejs的安装包:

xz -d node*.tar.xz

tar -xvf node*.tar

4、解压完node的安装文件后,需要配置下环境变量,编辑/etc/profile:

vi /etc/profile

5、添加以下内容:

# set node environment

export NODE_HOME=/opt/node-v6.9.2-linux-x64

export PATH=$PATH:$NODE_HOME/bin

6、使其立即生效:

source /etc/profile

7、这个时候可以测试一下node是否生效:

echo $NODE_HOME

node -v

npm -v

8、安装grunt:

npm install -g grunt-cli

9、打开elasticseach-head目录下的Gruntfile.js文件,命令模式下查找修改处:

/9100

修改为:

connect:

{

   server:{

     options: {

       port: 9100,

       hostname: '*',

       base: '.',

       keepalive: true

    }

  }

}

红色部分为新加上去的。

10、修改elasticsearch-head/_site/app.js链接地址:

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";

把localhost修改成你es的服务器地址,如:

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://10.10.10.10:9200";

11、安装,使用淘宝镜像更快

npm install -g grunt --registry=https://registry.npm.taobao.org

12、最后,启动nodejs

grunt server

13、开放9100端口,并访问

firewall-cmd --add-port=9100/tcp

curl http://192.168.13.157/9100

Elasticsearch5.1.1+ik分词器+HEAD插件安装小记的更多相关文章

  1. Docker下安装Elasticsearch、ik分词器、kibana

    1:使用docker拉取Elasticsearch镜像 docker pull elasticsearch:7.12.0(不加版本号默认是最新版本) 2:查看是否成功下载镜像 docker image ...

  2. Elasticsearch下安装ik分词器

    安装ik分词器(必须安装maven) 上传相应jar包 解压到相应目录 unzip elasticsearch-analysis-ik-master.zip(zip包) cp -r elasticse ...

  3. ElasticSearch(六):IK分词器的安装与使用IK分词器创建索引

    之前我们创建索引,查询数据,都是使用的默认的分词器,分词效果不太理想,会把text的字段分成一个一个汉字,然后搜索的时候也会把搜索的句子进行分词,所以这里就需要更加智能的分词器IK分词器了. 1. i ...

  4. IK分词器的安装与使用IK分词器创建索引

    之前我们创建索引,查询数据,都是使用的默认的分词器,分词效果不太理想,会把text的字段分成一个一个汉字,然后搜索的时候也会把搜索的句子进行分词,所以这里就需要更加智能的分词器IK分词器了. 1. i ...

  5. Elastic Stack 笔记(二)Elasticsearch5.6 安装 IK 分词器和 Head 插件

    博客地址:http://www.moonxy.com 一.前言 Elasticsearch 作为开源搜索引擎服务器,其核心功能在于索引和搜索数据.索引是把文档写入 Elasticsearch 的过程, ...

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

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

  7. docker上安装elasticsearch和ik分词器插件和header,实现分词功能

    docker run -di --name=tensquare_es -p 9200: -p 9300:9300 elasticsearch:5.6.8 创建elasticsearch容器(如果版本不 ...

  8. es-07-head插件-ik分词器插件

    5.x以后, es对head插件的支持并不是特别好 而且kibana的功能越来越强大, 建议使用kibana 1, head插件安装 在一台机器上安装head插件就可以了 1), 更新,安装依赖 su ...

  9. IK分词器插件elasticsearch-analysis-ik 6.1.1

    http://88250.b3log.org/full-text-search-elasticsearch#b3_solo_h3_0 IK分词器插件 (1)源码 https://github.com/ ...

随机推荐

  1. linux 内核cache

    写驱动总会碰到和cache相关的东西 记录下用到的接口: 驱动中用的内存地址一般为内核地址,用户调用驱动接口时,有时候会把自己申请的地址赋给驱动,此时用户kmalloc得到内核地址, 再用mmap获得 ...

  2. VS2013 配置pthread

    参考:http://blog.csdn.net/qianchenglenger/article/details/16907821 一.下载地址 ftp://sourceware.org/pub/pth ...

  3. *HDU1325 并查集

    Is It A Tree? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...

  4. python 获取网页图片

    re为正则表达式模组 re.findall在字符串中查找所有匹配的模式,返回一个list urllib2提供了使用简单的url工具 urllib2.urlopen发送url请求,返回一个文件流 imp ...

  5. workspace路径有中文情况会报java.net.MalformedURLException: unknown protocol: d错误

    原因及描述:java读取xml文件时如果出现中文字符就会出现这类错误 解决方法:   1.将中文路径改为英文路径 2.读取file时"file:///d:/" 而不是"d ...

  6. Google 云计算中的 GFS 体系结构

          google 公司的很多业务具有数据量巨大的特点,为此,google 公司研发了云计算技术.google 云计 算结构中的 google 文件系统是其云计算技术中的三大法宝之一.本文主要介 ...

  7. 设计模式之六大原则——接口隔离原则(ISP)

    设计模式之六大原则——接口隔离原则(ISP)  转载于:http://www.cnblogs.com/muzongyan/archive/2010/08/04/1792528.html 接口隔离原则 ...

  8. javascript 杂记

    博客 http://www.cnblogs.com/onepixel/ http://www.cnblogs.com/ahthw/p/4240220.html#javascript call.appl ...

  9. Run P4 without P4factory - A Simple Example In Tutorials.

    前言 本文是我运行P4社区于Github开源教程Tutorials中的P4 SIGCOMM 2015 Tutorial一些实战小结,Github链接: Github. 测试的例子:P4 SIGCOMM ...

  10. IDEA +maven+ ContextLoaderListener not find

    tomcat 启动失败:SEVERE: Context [] startup failed due to previous errors 查看pox.xml 有spring-web依赖 查看tomca ...