ElasticSearch5.0的安装

ElasticSearch5.0的安装

我在安装5.0版本的时候 和1.4版本不一样
出现了特别多的问题 下面总结一下:
注意 jdk 必须1.8,centos6以上 linux系统低会报错但不影响使用

1.启动必须是新建的用户 不能是root用户,这是安全机制引起的

groupadd -g 600  es
useradd -u 600 -g 600 es
passwd es 设置密码

2.将elasticSearch设置用户用户组

sudo -R chown es:es elasticSearch

3.修改config中的yml文件

# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: hr_es
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: es_1
node.master: true
node.data: false
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /home/software/esdata
#
# Path to log files:
#
path.logs: /home/software/eslogs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#

#bootstrap.memory_lock: true
bootstrap.memory_lock: false
bootstrap.system_call_filter: false


# ---------------------------------- Network -----------------------------------

network.host: 0.0.0.0

http.port: 9200


//注意   es  data目录和log目录 必须改成es用户的 否则没有权限 
chown -R es:es 

4.系统中的设置

1. vi /etc/security/limits.conf   添加内容

* soft nofile 65536

* hard nofile 131072

* soft nproc 2048

* hard nproc 4096


2. vi /etc/security/limits.d/90-nproc.conf  修改内容 

*          soft    nproc     1024-》改成2048


3. vi /etc/sysctl.conf  添加内容
   vm.max_map_count=655360
   并执行 :sysctl -p

5.最后在es用户下执行启动,启动前先创建yml中配置的目录

以上是单节点的

集群的配置:

1.在yml中添加如下的字段:

discovery.zen.ping.unicast.hosts: ["192.168.80.11:9300","192.168.80.12:9300"]
指定集群节点

discovery.zen.minimum_master_nodes: 1
有几个主节点(老大)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值