1. 下载,解压

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.5.4.tar.gz
tar -zxvf elasticsearch-6.5.4.tar.gz

2.创建用户和组

groupadd bigdata
useradd elastic -g bigdata -p

3.更改权限

# 将elasticsearch-.5目录下的所有权限赋予刚创建的用户
chown -R elastic:bigdata elasticsearch-6.5.

4. 修改ip ,修改配置文件

vi elasticsearch-6.5./config/elasticsearch.yml

配置文件修改如下:

cluster.name: el-cluster-name        # 集群名称
node.name: node- # 端点名
#node.attr.rack: r1
path.data: /home/elasticsearch/data # 数据目录
path.logs: /home/elasticsearch/logs # 日志目录
network.host: 0.0.0.0 # 本机IP
http.port: # http 端口
bootstrap.system_call_filter: false # centOS7 以下关闭

5.启动

./elasticsearch

6.常见错误

[]: max file descriptors [] for elasticsearch process is too low, increase to at least []
[]: max number of threads [] for user [esyonghu] is too low, increase to at least []
[]: max virtual memory areas vm.max_map_count [] is too low, increase to at least []
[4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

6.1 针对错误[1]、[2],可以采取如下方式

修改 /etc/security/limits.conf 配置文件:

[root@yqtrack-elk03 /]# vim /etc/security/limits.conf

添加如下配置项:

* - nproc
* - nofile
* - memlock unlimited

修改 /etc/security/limits.d/90-nproc.conf 配置文件:

[root@yqtrack-elk03 /]# vim /etc/security/limits.d/-nproc.conf

修改如下配置项目:

* soft nproc unlimited
root soft nproc unlimited  

修改完成后,重新登录elk账户,查看设置是否生效。

[elk@yqtrack-elk03 /]$ ulimit -n
409600
[elk@yqtrack-elk03 /]$ ulimit -u
65535

6.2 针对错误[3],max_map_count过小, 可以采取如下方式

修改 /etc/sysctl.conf 文件配置项:

[root@localhost /]# vim /etc/sysctl.conf

# 一个进程可以拥有的VMA(虚拟内存区域)的数量:
vm.max_map_count= # 调用虚拟内存的阈值数:
vm.swappiness= #禁用IPv6
net.ipv6.conf.all.disable_ipv6 =
net.ipv6.conf.default.disable_ipv6 = [root@localhost /]# sysctl -p

6.3 针对错误[4],可以采取如下方式:

出现错误的原因:是因为centos6.x操作系统不支持SecComp,而elasticsearch 5.5.2默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。

在elasticsearch.yml中添加配置项:bootstrap.system_call_filter为false:

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

6.4  root用户启动elasticsearch报错

Elasticsearch为了安全考虑,不让使用root启动,解决方法新建一个用户,用此用户进行相关的操作。如果你用root启动,会出现 “java.lang.RuntimeException: can not runelasticsearch as root” 错误。

解决:用非 root 用户重新启动。

6.5 JVM虚拟机内存不足

错误:“JavaHotSpot(TM) 64-Bit Server VM warning: INFO: error='Cannotallocate memory' (errno=12)”表示内存不足,

其配置文件为config目录下的 jvm.options, 默认为2g,可以修改为1g

7. 外网访问

修改配置 network.host为“0.0.0.0”

修改 discovery.zen.ping.unicast.hosts为“[“0.0.0.0”]”

elasticsearch 6.x 安装与注意的更多相关文章

  1. Elasticsearch和Kibana安装

    Elasticsearch安装 Elasticsearch至少需要Java 8.在撰写本文时,建议你使用Oracle JDK版本1.8.0_131.Java安装因平台而异,所以在这里不再赘述.Orac ...

  2. elasticsearch+kibana+metricbeat安装部署方法

    elasticsearch+kibana+metricbeat安装部署方法 本文是elasticsearch + kibana + metricbeat,没有涉及到logstash部分.通过beat收 ...

  3. ElasticSearch 5.4 安装

        1. 前期准备  环境准备 IP地址 操作系统 内存 192.168.1.10 centos 7 16 192.168.1.11 centos 7 16 192.168.1.12 centos ...

  4. Elasticsearch介绍及安装部署

    本节内容: Elasticsearch介绍 Elasticsearch集群安装部署 Elasticsearch优化 安装插件:中文分词器ik 一.Elasticsearch介绍 Elasticsear ...

  5. Elasticsearch 5.x安装

    node1 elasticsearch node2 elasticsearch node3 elasticsearch 前期准备 JDK1.8 修改/etc/security/limits.conf ...

  6. Elasticsearch本地环境安装和常用操作

    本篇文章首发于我的头条号Elasticsearch本地环境安装和常用操作,欢迎关注我的头条号和微信公众号"大数据技术和人工智能"(微信搜索bigdata_ai_tech)获取更多干 ...

  7. ELK 学习笔记之 elasticsearch head插件安装

    elasticsearch head插件安装: 准备工作: 安装nodejs和npm https://nodejs.org/en/download/ node-v6.11.2-linux-x64.ta ...

  8. elasticsearch入门及安装

    参考教程 elasticsearch入门教程:https://www.yiibai.com/elasticsearch/elasticsearch-getting-start.html Java JD ...

  9. Elasticsearch 及 Kibana 安装篇

    简介 官网-安装介绍 这里记载了各个软件包的安装方法,Linux Mac Windows-- 本文记载的是在 CentOS 系统安装 Elasticsearch 7.0.0 版本的步骤. 安装 Jav ...

  10. elasticsearch与kibana安装过程(linux)

    elasticsearch与kibana安装 下载 Elasticsearch 官网:https://www.elastic.co/,elastic search应用本质就是一个jvm进程,所以需要J ...

随机推荐

  1. .net 开发者尝试Apache Spark™

    本文编译自一篇msdn magazine的文章,原文标题和链接为: Test Run - Introduction to Spark for .NET Developers https://msdn. ...

  2. 调用kylin的restAPI接口构建cube

    调用kylin的restAPI接口构建cube 参考:http://kylin.apache.org/docs/howto/howto_build_cube_with_restapi.html 1. ...

  3. C#中实现对象的深拷贝

    深度拷贝指的是将一个引用类型(包含该类型里的引用类型)拷贝一份(在内存中完完全全是两个对象,没有任何引用关系).......... 直接上代码: /// <summary> /// 对象的 ...

  4. Javascript对象的几种创建方式

    (1) 工厂模式 Function(){ Var child = new object() Child.name = “欲泪成雪” Child.age=”20” Return child; } Var ...

  5. 关于gcd和exgcd的一点心得,保证看不懂(滑稽)

    网上看了半天……还是没把欧几里得算法和扩展欧几里得算法给弄明白…… 然后想了想自己写一篇文章好了…… 参考文献:https://www.cnblogs.com/hadilo/p/5914302.htm ...

  6. vue $emit 父组件与子组件之间的通信(父组件向子组件传参)

    1.首先新建一个子页面为 env.vue的文件(名字这里大家可以自取) 2.然后把子页面引入父页面,代码如图: import env from '@/components/common/env' ex ...

  7. su: Authentication failure 的解决方案

    原因是:ubuntu默认不允许使用root登录,因此初始root账户是不能使用的,需要在普通账户下利用sudo权限修改root密码. 解决方案很简单:设置一个root密码就行了.注意是sudo 而不是 ...

  8. IntelliJ IDEA中可以用Tab键跳出括号和引号吗?

    在 Settings->Editor->General->Smart Keys 中勾选 Jump outside closing bracket/quote with Tab 即可.

  9. SHELL脚本扩展

    使用SED命令 sed称为流编辑器,命令格式如下: sed option script file -e script #指定多个命令 -f script_file #指定命令文件 -n #不需要为每个 ...

  10. Python库大全

    网络 urllib -网络库(stdlib). requests -网络库. grab – 网络库(基于pycurl). pycurl – 网络库(绑定libcurl). urllib3 – Pyth ...