elasticsearch是可以搜索及存储的,它的优缺点在这暂时不介绍了,直接开始elk之旅的elasticsearch的环境搭建。你可以使用yum、docker及tar安装,本人使用tar安装可更好的了解其流程,那么开始吧!
安装包
下载地址:https://www.elastic.co/cn/downloads/elasticsearch
本次实验使用的版本为7.3.0,由于是国外网站下载可能会慢些,找个网络好的环境在搞吧,下面开始进行安装
解压tar包
tar -zxvf elasticsearch-7.3.0
解压之后德 目录如下:
配置elasticsearch.yml文件,具体配置如下:
cluster.name: nrt-application
node.name: node-18
path.data: /home/elkuser/elasticsearch-7.3.0/data
path.logs: /home/elkuser/elasticsearch-7.3.0/logs
bootstrap.memory_lock: false
network.host: localhost
http.port: 9200
cluster.initial_master_nodes: ["node-18"]
配置完之后进入bin目录启动
./elasticsearch
访问地址:http://localhost:9200/,得到下图返回结果说明安装成功
安装过程中遇到的问题
1.max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
root权限打开vim /etc/security/limits.conf
添加下面设置 非root用户是用户
xxx soft nofile 65536
xxx hard nofile 65536
退出用户重新登录,使配置生效
2.使用非root用户启动elasticsearch
chown -R elkuser:elkuser