ELK(2):ELK安装环境和安装包

ELK(2):ELK环境和安装包准备

1.1        环境配置

1.1.1  配置Java环境

elasticsearch和Logstash 的运行依赖于 Java 运行环境, Logstash 5.6 以上版本不低于 Oracle JDK version 1.8.0_131,7.0之后貌似对OpenJDK支持友好。出于习惯,这里采用的1.8.0_212。

 

java -version
#java version "1.8.0_212"
#Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
#Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)

 

 

1.1.2  调整可用内存

#elasticsearch最少262144 否则报错
#永久
echo 'vm.max_map_count=655360' | sudo tee -a  /etc/sysctl.conf
sudo sysctl -p
#临时
sudo sysctl -w vm.max_map_count=655360
#查看
sudo sysctl -a|grep vm.max_map_count

 

1.1.3  调整最大打开文件数

#elasticsearch要求65535否则报错
echo "* soft nofile 655350" | sudo tee -a  /etc/security/limits.conf
echo "* hard nofile 655350" | sudo tee -a  /etc/security/limits.conf
ulimit –Hu
ulimit -Su
如果重新登录不生效

vi /etc/ssh/sshd_config
将# UseLogin no 改成  UseLogin yes,并重启 ssh

 

1.2        RPM安装包

ELK 套间版本尽量一致,避免各种坑和奇葩的错误!Redis 还是采用3.0后的吧!我提前安装了用的4.0.6

https://www.elastic.co/downloads

http://download.redis.io/releases/

elasticsearch-7.2.0-x86_64.rpm  
filebeat-7.2.0-x86_64.rpm  
kibana-7.2.0-x86_64.rpm  
logstash-7.2.0.rpm
redis:4.0.6 #我预先安装了,不一定用

nohup wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.2.0-x86_64.rpm  &
nohup wget https://artifacts.elastic.co/downloads/logstash/logstash-7.2.0.rpm  &
nohup wget https://artifacts.elastic.co/downloads/kibana/kibana-7.2.0-x86_64.rpm  &
nohup wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.2.0-x86_64.rpm  &

 

posted on 2019-07-15 16:49  光阴8023  阅读(428)  评论(0编辑  收藏  举报