我用的是centos6.5,安装elasticsearch5.2.0

首先不说了,安装JDK1.8,下载elasticsearch5.2.0

https://www.elastic.co/downloads/past-releases

上传到linux下,解压tar -zxvf ...

ela2.0之后不能用root启动了

#adduser tommy
#passwd tommy   //修改密码

#vim /etc/sudoers

方法一:修改 /etc/sudoers 文件,找到下面一行,把前面的注释(#)去掉

## Allows people in group wheel to run all commands
%wheel    ALL=(ALL)    ALL

然后修改用户,使其属于root组(wheel),命令如下:

#usermod -g root tommy

切换到tommy账户

修改elasticsearch/config/elasticsearch.yml文件

path.data: /data/shuju/

path.logs: /data/logs/

# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 172.16.255.231
#
# Set a custom port for HTTP:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.zen.ping.unicast.hosts: ["172.16.255.231", "[::1]"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
discovery.zen.minimum_master_nodes: 3
bootstrap.memory_lock: false //这个解决centos6.5下出现的问题
bootstrap.system_call_filter: false

错误1

max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]

 [root@localhost ~]# cat /etc/sysctl.conf | grep -v "vm.max_map_count" > /tmp/system_sysctl.conf
[root@localhost ~]# echo "vm.max_map_count=262144" >> /tmp/system_sysctl.conf
[root@localhost ~]# mv /tmp/system_sysctl.conf /etc/sysctl.conf
mv:是否覆盖"/etc/sysctl.conf"? y
[root@localhost ~]# cat /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
vm.max_map_count=262144
[root@localhost ~]# sysctl -p
vm.max_map_count = 262144

错误2

max number of threads [1024] for user [elasticsearch] is too low, increase to at least [2048]

修改 /etc/security/limits.d/90-nproc.conf 

*          soft    nproc     1024

*          soft    nproc     2048

错误3

JavaHotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000085330000, 2060255232, 0) failed; error='Cannot allocate memory' (errno=12)

由于elasticsearch5.0默认分配jvm空间大小为2g,修改jvm空间分配

    # vim config/jvm.options
-Xms2g --》修改为512m
-Xmx2g --》修改为512m

错误4

自己创建文件目录,不然会报找不到目录然后不能创建文件的错误

剩下的我也不记得了,遇到问题就解决问题吧

[root@lijia231 ~]# curl 172.16.255.231:
{
"name" : "xPqxh4x",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "_na_",
"version" : {
"number" : "5.2.0",
"build_hash" : "24e05b9",
"build_date" : "2017-01-24T19:52:35.800Z",
"build_snapshot" : false,
"lucene_version" : "6.4.0"
},
"tagline" : "You Know, for Search"
}

最后出现这个说明暂时安装成功了。

elasticsearch安装之各种坑的更多相关文章

  1. centos7+docker+elasticsearch 安装记录+踩坑

    版本: cenos7 :3.10.0-957.21.3.el7.x86_64  (内核需>=3.10 才可以安装) docker: yum安装版本为1.13.1 elasticsearch: 6 ...

  2. ElasticSearch安装中遇到的一些问题

    前段时间部署ElasticSearch,现把安装中遇到的一些问题和注意细节与大家分享一下. 系统:CentOS7.2 0.安装JDK 8,配置环境变量 官网下载地址:http://www.oracle ...

  3. 全文搜索引擎 Elasticsearch 安装

    全文搜索引擎 Elasticsearch 安装 学习了:http://www.ruanyifeng.com/blog/2017/08/elasticsearch.html 拼音:https://www ...

  4. elasticsearch安装中文分词器插件smartcn

    原文:http://blog.java1234.com/blog/articles/373.html elasticsearch安装中文分词器插件smartcn elasticsearch默认分词器比 ...

  5. Elasticsearch安装配置问题

    1.配置服务 ip 和 端口 进入 elasticsearch 安装目录,打开 config/elasticsearch.yml 配置 net.host 和 http.port net.host: 0 ...

  6. ElasticSearch安装及部署

    安装及部署 一.环境配置 操作系统:Cent OS 7ElasticSearch版本:1.3.2JDK版本:1.7.0_51SSH Secure Shell版本:XShell 5elasticsear ...

  7. Elasticsearch安装和使用

    Elasticsearch安装和使用 Elasticsearch 是开源搜索平台的新成员,实时数据分析的神器,发展迅猛,基于 Lucene.RESTful.分布式.面向云计算设计.实时搜索.全文搜索. ...

  8. CentOS7.4安装MySQL踩坑记录

    CentOS7.4安装MySQL踩坑记录 time: 2018.3.19 CentOS7.4安装MySQL时网上的文档虽然多但是不靠谱的也多, 可能因为版本与时间的问题, 所以记录下自己踩坑的过程, ...

  9. Elasticsearch安装详解

    本文只介绍在windows上的安装和配置,其他安装和配置请参见官方文档 ES在windows上安装需下载zip安装包,解压后bin目录下有个 elasticsearch-service.bat 文件. ...

随机推荐

  1. java 基础--理论知识

    变量分:局部变量全局变量-----------------------------------------------------变量三大特性[标识符,初始值,作用域]定义变量:语法:[访问修饰符] ...

  2. Anton 上课题

    Anton 上课题 Anton likes to play chess. Also he likes to do programming. No wonder that he decided to a ...

  3. Associative Containers

    Notes from C++ Primer Associative containers differ in fundamental respect from the sequential conta ...

  4. MySQL性能调优与诊断

    * 本篇随笔为<涂抹MySQL>一书的阅读摘抄,详细请查看正版书籍 关键性指标 IOPS(Input/Output operations Per Second) 每秒处理的I/O请求次数 ...

  5. PHP中url相关函数

    1,string urlencode(string $str)/string urldecode(string $str) urlencode将中文以及特殊字符转化为16进制,然后在每个字符前面加%: ...

  6. Vue自定义指令,ref ,sync,slot

    一.自定义指令 vue中可以自己设置指令,通过directive来实现,有2种创建方式,一种是局部创建,一种是全局创建. 第一种:局部创建 如果想注册局部指令,组件中也接受一个 directives  ...

  7. JSLint在idea编译器中报错

    jslint:this function needs a 'use strict' pragma报错解决 JSInt是指在编写代码的时候进行代码检查语法,没有必要开启 关闭的方法 在setting中搜 ...

  8. js的微观性能

    概述 js的微观性能是指js的某一个表达式或者某一行或者某一块代码的性能.几天前和同事讨论过这方面的内容,今天深入研究了一下,记录下来,供以后开发时参考,相信对其他人也有用. 从一段代码说起 记得以前 ...

  9. redis 缓存

    本篇博客只介绍 redis 作为缓存的的一些使用,以及在项目中如何把redis和spring如何集成. 1:redis的maven依赖,redis 依赖   spring-redis 依赖: < ...

  10. Swift5 语言指南(七) 集合类型

    Swift提供三种主要的集合类型,称为数组,集合和字典,用于存储值集合.数组是有序的值集合.集是唯一值的无序集合.字典是键值关联的无序集合. Swift中的数组,集合和字典总是清楚它们可以存储的值和键 ...