安裝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/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM