当前位置: 代码迷 >> 综合 >> centos7.2环境elasticsearch-5.0.1+kibana-5.0.1+zookeeper3.4.6+kafka_2.9.2-0.8.2.1部署详解
  详细解决方案

centos7.2环境elasticsearch-5.0.1+kibana-5.0.1+zookeeper3.4.6+kafka_2.9.2-0.8.2.1部署详解

热度:72   发布时间:2023-12-12 17:27:20.0
centos7.2环境elasticsearch-5.0.1+kibana-5.0.1+zookeeper3.4.6+kafka_2.9.2-0.8.2.1部署详解


环境准备:
操作系统:centos7.2 x86_64

# uname -a
Linux u04elk03.yaya.corp 3.10.0-327.22.2.el7.x86_64 #1 SMP Thu Jun 23 17:05:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
软件包:
jdk-8u102-linux-x64.rpm
kibana-5.0.1-x86_64.rpm
elasticsearch-5.0.1.rpm
kafka版本:2.9.2-0.8.2.1.tgz
zookeeper3.4.6.tar.gz

zook和kafka集群:
u04elk03.yaya.corp
u04elk02.yaya.corp
u04elk.yaya.corp

elasticsearch集群:
u04elk03.yaya.corp
u04elk02.yaya.corp

1.安装jdk1.8,记得删除之前的openjdk或者低版本jdk


rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.101-3.b13.el7_2.x86_64
rpm -e --nodeps python-javapackages-3.4.1-11.el7.noarch
rpm -e --nodeps tzdata-java-2016f-1.el7.noarch
rpm -e --nodeps java-1.8.0-openjdk-1.8.0.101-3.b13.el7_2.x86_64
rpm -e --nodeps javapackages-tools-3.4.1-11.el7.noarch


2.安装elasticsearch-5.0.1
下载地址:https://www.elastic.co/downloads
rpm -ivh elasticsearch-5.0.1.rpm


u04elk02.yaya.corp的elasticsearch.yml配置
cluster.name: yunva_elk_cluster

# 集群的关键配置

discovery.zen.ping.unicast.hosts: ["u04elk02.yaya.corp", "u04elk03.yaya.corp"]


node.name: u04elk02.yaya.corp
node.master: true
node.data: true
path.data: /data/es/data
path.logs: /data/es/logs
bootstrap.memory_lock: false
network.host: 0.0.0.0
http.port: 9200


u04elk03.yaya.corp的配置

# cat /etc/elasticsearch/elasticsearch.yml


cluster.name: yunva_elk_cluster

# 集群的关键配置

discovery.zen.ping.unicast.hosts: ["u04elk02.yaya.corp", "u04elk03.yaya.corp"]



node.name: u04elk03.yaya.corp
node.master: true
path.data: /data/es/data
path.logs: /data/es/logs
bootstrap.memory_lock: false
network.host: 0.0.0.0
http.port: 9200


创建日志和数据存放目录
mkdir -p /data/es/data
mkdir /data/es/logs
chown -R elasticsearch.elasticsearch /data/es


启动elasticsearch

systemctl start elasticsearch
syst