ElasticSearch安装到centos7

ElasticSearch安装到centos7

1.下载安装包

官方下载链接
进入官网之后选择所要下载的平台和版本并获取其相应的包链接
在这里插入图片描述

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.0.0-linux-x86_64.tar.gz

2.解压

tar -xzvf elasticsearch-8.0.0-linux-x86_64.tar.gz -C /usr/local/

3.修改配置

cd /usr/local/elasticsearch-8.0.0-linux-x86_64/config
vim elasticsearch.yml

3.1 指定日志文件路径

path.logs: /ssd1/elasticsearch-8.0.0/logs

3.2 指定数据目录

path.data: /home/es-data

3.3 修改访问ip地址限制

⚠️注意:默认为127.0.0.1也就是只能本地访问。

network.host: 0.0.0.0

4. 运行

4.1 先新增非root用户

4.2 以非root用户身份登陆系统

su - 非root用户名

4.3 进入到ElasticSearch 安装目录下的bin目录

cd /usr/local/elasticsearch-8.0.0-linux-x86_64/bin

4.4 输入运行命令启动服务

./elasticsearch

初次启动时会遇到的问题汇总

问题1

max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

解决方法

问题2

ERROR: [2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch.
bootstrap check failure [1] of [2]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
bootstrap check failure [2] of [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决方法

相关链接

此项教程所借鉴的教程

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

@Sadam

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值