安装ES6及HEAD插件

1.下载相应npm包

es6地址:https://www.elastic.co/cn/downloads/past-releases/elasticsearch-6-2-2
head插件地址:https://github.com/mobz/elasticsearch-head/

2.安装ES

#yum install elasticsearch-6.2.2.rpm

2.1 修改ES配置文件

# egrep -v "^#|^$" elasticsearch.yml
cluster.name: elk6 #集群名字
node.name: "elk-a1" #节点名字
node.master: true #主节点
node.data: true
discovery.zen.ping.unicast.hosts: ["192.168.x.x"]
discovery.zen.fd.ping_timeout: 60s
discovery.zen.fd.ping_retries: 5
indices.fielddata.cache.size: 40%
bootstrap.system_call_filter: false
http.cors.enabled: true #允许插件
http.cors.allow-origin: "*"
path.data: /xx/elasticsearch #数据目录
path.logs: /var/log/elasticsearch #日志目录
network.host: 0.0.0.0

2.2 启动ES

ES6依赖jdk1.8,并且ulimit要大于65535,数据目录权限需要是elasticsearch
修改ulimit
#vim /etc/security/limits.conf
\* soft nofile 65536
\* hard nofile 65536
chown -R elasticsearch.elasticsearch /xx/elasticsearch
service elasticsearch start

3.安装head插件

3.1 安装nodejs

#  curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -

# yum install -y nodejs

3.2 安装npm

# yum install npm

3.3 通过npm安装grunt

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

3.4 确认版本

`# node -v
v0.10.48

# npm -v

1.3.6

# grunt --version

grunt-cli v1.3.1`

3.5 下载head插件

# wget https://github.com/mobz/elasticsearch-head/archive/master.zip
# unzip master.zip
# mv elasticsearch-head-master/ /usr/local

3.6 安装head插件

# cd /usr/local/elasticsearch-head-master/
# npm install --registry=https://registry.npm.taobao.org
# 修改Head插件配置文件
# vim Gruntfile.js
# 找到connect:server,添加hostname一项,如下
connect: {
server: {
options: {
hostname: '0.0.0.0',
port: 9100,
base: '.',
keepalive: true
}
}

3.7 启动head插件

# nohup npm run start &

3.8 浏览器观察效果

访问:http://192.168.XX.XX:9100/

若显示未连接,将localhost改成IP,点击连接即可

4 安装ik插件

https://github.com/medcl/elasticsearch-analysis-ik/

转载于:https://www.cnblogs.com/aresxin/p/an-zhuangES6jiHEAD-cha-jian.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值