ELK详细安装配置

  • Post author:
  • Post category:其他


1.安装jdk1.8(略)

2.安装配置本机防火墙(略)

3.ELK版本选择

参考:

支持一览表 | Elastic

选择支持java8的版本

4.版本6安装

root依次用户执行

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.2.zip

wget ​https://artifacts.elastic.co/downloads/logstash/logstash-6.7.2.tar.gz​

wget https://artifacts.elastic.co/downloads/kibana/kibana-6.7.2-linux-x86_64.tar.gz

mkdir /usr/local/elk

unzip elasticsearch-6.8.23.zip -d /usr/loca/elk

tar -zxf logstash-6.8.23.tar.gz​  -C /usr/local/elk

tar -zxf kibana/kibana-6.8.23-linux-x86_64.tar.gz​  -C /usr/local/elk

groupadd elk

useradd -g elk elk -m

chown -R elk:elk  /usr/local/elk

mkdir -p /data/elasticsearch

chown -R elk:elk /data/elasticsearch

编辑配置文件

su – elk

cd /usr/local/elk

ln -s  elasticsearch-6.8.23   elasticsearch

cd elasticsearch

vi config/jvm.options

-Xms512m

-Xmx512m

vi config/elasticsearch.yml

单实例依次增加配置项

cluster.name: ELK-Cluster

node.name: master-node

path.data: /data/elasticsearch

path.logs: /usr/local/elasticsearch/logs

network.host: 0.0.0.0

http.port: 9200

transport.tcp.port: 9300

cluster.initial_master_nodes: [“node-1”]

./bin/elasticsearch -d && tail -f logs/ELK-Cluster.log

curl http://localhost:9200

cd ..

ln -s logstash-6.7.2 logstash

cd logstash

vi config/startup.options

LS_HOME=/usr/local/elk/logstash

LS_SETTINGS_DIR=/usr/local/elk/logstash

vi config/jvm.options

-Xms512m

-Xmx512m

vi config/logstash.conf



版权声明:本文为ccren原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。