es5.4.0-CentOS-6.5-x86_64安装文档

1.环境说明

本示例安装环境如下:

系统:CentOS-6.5-x86_64

主机ip:192.168.1.237

安装根目录:/opt/es/

Jdk:要求jdk8及以上版本,本示例为:jdk1.8.0_131

2.下载安装包并拷贝到centos上

下载地址:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.4.0.zip

路径:/opt/es/elasticsearch-5.4.0

3.创建es用户

es不能运行在root用户下,需要创建单独的用户

useradd es

chown -R es:es /opt/es/elasticsearch-5.4.0/

bin目录下的文件分配可执行权限

cd /opt/es/elasticsearch-5.4.0/bin/

chmod  777 elasticsearch*

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

#修改为

* soft nproc 2048

3)vi /etc/sysctl.conf

添加下面配置:

vm.max_map_count=655360

并执行命令:

sysctl -p

5.修改配置文件

cluster.name: es-test

node.name: node-1

node.master: true

node.data: true

#启动异常:ERROR: bootstrap checks failed,因为Centos6不支持SecComp,而默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。

bootstrap.system_call_filter: false

network.host: 0.0.0.0

discovery.zen.ping.unicast.hosts: ["192.168.1.237:9300"]

# 增加新的参数,这样head插件可以访问es

http.cors.enabled: true

http.cors.allow-origin: "*"

6.启动es,检查是否成功

cd /opt/es/elasticsearch-5.4.0

./bin/elasticsearch

http://192.168.1.237:9200/检查是否安装成功

如果不能连接,检查防火墙和iptables

关闭防火墙

setenforce 0

设置iptables,开放9200端口

vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 9200 -j ACCEPT

service iptables restart

转载于:https://my.oschina.net/xhx6616/blog/1528449

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值