一丶软件下载
elasticsearch:
https://www.elastic.co/downloads/past-releases
kibana:
https://www.elastic.co/downloads/past-releases
选择对应的版本的下载即可
二、es
安装es比较简单
rpm -ivh elasticsearch-2.4.2.rpm
修改配置文件
/etc/elasticsearch/elasticsearch.yml
network.bind_host: 0.0.0.0
node.name: sh-saas-o2o-elk4es-qa-01
path.data: /data/es/data
path.logs: /data/es/log
http.cors.allow-origin: "*"
http.cors.enabled: true
index.number_of_shards: 5
index.number_of_replicas: 0
注记得一定要把副本数量设置为0,因为没有集群,副本没法分配,会导致节点显示变成黄色。
安装head插件
rpm -ql elasticsearch 查看elasticsearch的二进制文件安装到哪里去了
/usr/share/elasticsearch/bin/plugin install mobz/elasticsearch-head
启动es
/etc/init.d/elasticsearch start
三·kibana
安装kibana
rpm -ivh kibana-4.6.0.rpm
配置kibana
/opt/kibana/config/kibana.yml
server.port: 5601
elasticsearch.url: "http://127.0.0.1:9200"
注:末尾追加这两行即可
四·验证
es正常 http://10.11.129.142:9200/_plugin/head/
kibana