elasticsearch6.2.4
jdk 1.8
centos6.8
1.解壓
/conf/elasticsearch.yml配置:
https://www.elastic.co/guide/cn/elasticsearch/guide/current/important-configuration-changes.html 官方文檔
詳細(xì)配置:
cluster.name: elasticsearch
node.name: ela50 (每臺(tái)機(jī)子不同,方便找到)
在memory中:
bootstrap.system_call_filter: false
network.host: 192.168.56.50 (綁定每臺(tái)機(jī)子的IP)
transport.tcp.port: 9300 (貌似可以不配,默認(rèn)9300)
http.port:9200
http.enabled: true (開啟http服務(wù))
http.cors.enabled:true
http.cors.allow-origin: "*"
http.cors.allo-credentials: true
在discover里配置
discovery.zen.ping.unicast.hosts:["192.168.56.50:9300","192.168.56.51:9300","192.168.56.52:9300"]
(在這個(gè)版本中,默認(rèn)單播,需要告訴可以發(fā)現(xiàn)的IP地址)
需要將系統(tǒng)的/etc/security/limits.conf中配置
* soft nofile 65536
* hard nofile 131072
/etc/security/limits.d/90-nproc.conf
* soft nproc? 4096
重啟后將參數(shù)讀入
npm安裝
rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -
yum -y install nodejs
elasticsearhc-head 配置
head需要從git上下載
git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
npm run start
open http://localhost:9100/