安裝ES6及HEAD插件

1.下載相應npm包

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

2.安裝ES

#yum install elasticsearch-6.2.2.rpm

 

2.1 修改ES配置文件git

# 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
修改ulimites6

#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安裝gruntgithub

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

 

3.4 確認版本npm

`# 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 瀏覽器觀察效果bootstrap

訪問:http://192.168.XX.XX:9100/

若顯示未鏈接,將localhost改爲IP,點擊鏈接便可
vim

4 安裝ik插件

https://github.com/medcl/elasticsearch-analysis-ik/瀏覽器

相關文章
相關標籤/搜索