2018-04-23 elastic6.2版本安装
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 官方文档
详细配置:
cluster.name: elasticsearch
node.name: ela50 (每台机子不同,方便找到)
在memory中:
bootstrap.system_call_filter: false
network.host: 192.168.56.50 (绑定每台机子的IP)
transport.tcp.port: 9300 (貌似可以不配,默认9300)
http.port:9200
http.enabled: true (开启http服务)
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"]
(在这个版本中,默认单播,需要告诉可以发现的IP地址)
需要将系统的/etc/security/limits.conf中配置
* soft nofile 65536
* hard nofile 131072
/etc/security/limits.d/90-nproc.conf
* soft nproc 4096
重启后将参数读入
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/