elasticsearch单台环境搭建(Linux环境)

一丶elasticsearch安装与重要配置说明

1.下载安装包:

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

2.解压文件

3.创建一个运行用户(es不允许使用root账户运行)
groupadd es

useradd -g es es

修改安装文件夹归属为添加的用户

4.运行

cd elasticsearch-7.5.2/bin./elasticsearch (-d|守护进程参数)

5.运行验证:

curl 127.0.0.1:9200


注:默认配置下,es绑定127.0.0.1,无法通过外网访问

二.重要配置说明

文件地址:安装目录/config/elasticsearch.yml

cluster.name: my-application  集群名,多台服务器es组成集群时,要有相同的cluster.name

二、运行错误解决:

1.max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

vi /etc/sysctl.conf

追加配置: vm.max_map_count=655360

sysctl -p

2.max number of threads [3637] for user [es] is too low, increase to at least [4096]

 vi /etc/security/limits.conf

追加配置

* soft nproc 4096 

* hard nproc 4096 

保存后重启服务器


©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容