elk集群部署
程序员文章站
2024-02-27 15:15:39
...
环境3台centos虚拟机
elasticsearch 192.168.
安装jdk
yum install java-1.8.0-openjdk -y
下载签名
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
在node-1安装elasticsearch
在/etc/yum.repos.d/目录下创建elasticsearch.repo
[elasticsearch]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=0
autorefresh=1
type=rpm-md
安装
sudo yum install --enablerepo=elasticsearch elasticsearch
配置/etc/elasticsearch/elasticsearch.yml
cluster.name:elk-cluster
node.name: node-1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 192.168.122.134
http.port: 9200
discover.seed_hosts: ["192.168.122.134","192.168.122.135"]
cluster.initial_master_nodes: ["node-1","node-2"]
启动
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service