ES单机部署配置

PS:禁止拷贝形式转载,转载请以URL形式

1.简介

ES部署配置记录

2.环境

ES:7.0
OS:centos7
ES安装目录:/home/elasticsearch-7.0.0
IP:192.168.5.220

3.添加ES账户

  1. adduser esadmin
  2. passwd esadmin
  3. chown esadmin /home/elasticsearch-7.0.0 -R

4. 修改/etc/sysctl.conf

文件末尾追加:

vm.swappiness=1
vm.max_map_count=655360

执行生效:
sysctl -p

5. 修改/etc/security/limits.conf

文件末尾追加:

esadmin soft nofile 655360
esadmin hard nofile 655360
esadmin soft memlock unlimited
esadmin hard memlock unlimited
esadmin soft nproc 4096
esadmin hard nproc 4096

6. 修改{ES安装目录}/config/elasticsearch.yml

文件末尾追加:

http.cors.enabled: true
http.cors.allow-origin: "*"
bootstrap.memory_lock: true

cluster.name: test
node.name: master
cluster.initial_master_nodes: ["master"]
network.host: ["127.0.0.1","192.168.5.220"]
index.store.type: niofs

7. 启动

  1. 切换为ES专用账户:su esadmin
  2. 直接启动:{ES安装目录}/bin/elasticsearch
  3. 后台启动:{ES安装目录}/bin/elasticsearch -d

8. 验证

image.png

你可能感兴趣的:(ES单机部署配置)