centos单机部署es-7.6.2

创建es账户

# 创建用户 es
useradd es

# 设置es用户密码
userpd es

如果是在本机连接,直接切换到es用户,启动bin/elasticsearch文件启动es即可
如果是远程连接,继续进行下面操作

修改es配置文件

vim elasticsearch.yml

允许远程访问

network.host: 0.0.0.0

如果此时启动es会报错启动失败

继续添加以下配置

http.cors.allow-origin: "*"
http.cors.enabled: true
cluster.name: es-plume
discovery.seed_hosts: ["127.0.0.1"]
cluster.initial_master_nodes: ["es-plume"]

修改系统配置文件

该步骤需要在root账号下进行

  1. 修改 limits.conf
vim /etc/security/limits.conf

末尾添加下面内容

es soft nofile 65536
es hard nofile 65536
es soft nproc 4096
es hard nproc 4096

注意es为刚刚创建的用户名

  1. 修改 sysctl.conf
vi /etc/sysctl.conf 

末尾添加下面内容

vm.max_map_count = 655360

启动es

切换到es用户

su es

启动es

es-7.6.2/bin/elasticsearch
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值