下载地址
Elasticsearch:https://www.elastic.co/cn/downloads/elasticsearch
Logstash:https://www.elastic.co/cn/downloads/logstash
Kibana:https://www.elastic.co/cn/downloads/kibana
ELK三者都是Java开发的,所以在系统中需要安装JDK的版本在8以上,但是现在下载的安装包中都有jdk,所以本机没有安装JDK也是可以的。
# 安装的主目录
cd /usr/local/
mkdir elk
一、Elasticsearch安装
cd elk/
tar -zxvf elasticsearch-8.5.3-linux-x86_64.tar.gz
cd elasticsearch-8.5.3/
# es因为安全问题拒绝使用root用户启动,因此新建用户
# --------新建用户-----------
# 添加用户
useradd elk
# 为用户设置密码,可以为空
# passwd elk
# 为用户设置文件夹权限(我都是整个software目录,大家根据自己的实际情况进行设置)
chown -R elk /usr/local/elk/
# 切换用户
su elk
# ----------用户结束--------
# 前台启动
./bin/elasticsearch
# 后台启动
./bin/elasticsearch -d
# 测试,返回json成功
curl http://localhost:9200
# 外部访问
vim config/elasticsearch.yml
network.host: 0.0.0.0
常见问题
1.exception during geoip databases update
此版本将GeoIp功能默认开启了采集。在默认的启动下是会去官网的默认地址下获取最新的Ip的GEO信息
解决:在elasticsearch.yml中添加配置
ingest.geoip.downloader.enabled: false
2.max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
解决:
vim /etc/security/limits.conf
#此处elasticsearch对应用户名,可以用*
elasticsearch soft nofile 65536
elasticsearch hard nofile 65536
3.max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
vim /etc/sysctl.conf
# 新增配置
vm.max_map_count=262144
# 刷新
sysctl -p
- curl localhost:9200
curl: (52) Empty reply from server
Transport SSL must be enabled if security is enabled. Please set [xpack.security.transport.ssl.enabled] to [true] or disable security by setting [xpack.security.enabled] to [false]
#开启安全配置
xpack.security.enabled: false
二、Logstash安装
二、kibana安装
tar -zxvf kibana-8.3.3-linux-x86_64.tar.gz
标签:ELK,elk,enabled,用户,Kibana,CentOS7,elasticsearch,security,安装
From: https://www.cnblogs.com/a999/p/17008418.html