我用的是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. linux下设置计划任务执行python脚本

    linux下设置计划任务执行python脚本 简介 crontab命令被用来提交和管理用户的需要周期性执行的任务,与windows下的计划任务类似,当安装完成操作系统后,默认会安装此服务工具,并且会自 ...

  2. SPI通信协议(非原创,转载他人,用于学习)

    SPI通信协议:1.SPI主从模式:2.数据信号的相位与极性:3.数据帧的格式. 一.什么是SPI? SPI是串行外设接口(Serial Peripheral Interface)的缩写.是 Moto ...

  3. Linux 防火墙相关

    1.SELinux 防火墙 1.1 查看SELinux状态: 1) /usr/sbin/sestatus -v      ##如果SELinux status参数为enabled即为开启状态 bamb ...

  4. 在jenkins中调用maven的变量

    Maven内置变量说明: ${basedir} 项目根目录(即pom.xml文件所在目录) ${project.build.directory} 构建目录,缺省为target目录 ${project. ...

  5. ReactNative学习笔记(六)集成视频播放

    概述 视频播放可以自己写原生代码实现,然后注入JS.如果对视频播放没有特殊要求的话,可以直接使用现成插件. 到官方推荐的插件网站搜索找到下载量第一的插件:react-native-video. 安装 ...

  6. Akka-Cluster(3)- ClusterClient, 集群客户端

    上篇我们介绍了distributed pub/sub消息传递机制.这是在同一个集群内的消息共享机制:发布者(publisher)和订阅者(subscriber)都在同一个集群的节点上,所有节点上的Di ...

  7. 三种方法在当前目录下打开cmd命令窗口

    概述 运行npm的时候,每次都要cd到目录,很麻烦,所以总结了三种在当前目录下直接打开cmd窗口的方法,供以后开发时参考,相信对其他人也有用. 方法一 在当前目录按住shift再右键. 会看到右键菜单 ...

  8. Spring controller 中接收JSON参数失败

    如果方法中的参数都是JSON类型,则在方法参数前面添加  @RequestBody 注解: public Boolean serverPath(@RequestBody ServerPathReq r ...

  9. UFLDL 教程学习笔记(一)神经网络

    UFLDL(Unsupervised Feature Learning and Deep Learning)Tutorial 是由 Stanford 大学的 Andrew Ng 教授及其团队编写的一套 ...

  10. Linux学习笔记之九————ubuntu软件安装与卸载

    一.更新 源 1. 寻找国内镜像源 所谓的镜像源:可以理解为提供下载软件的地方,比如Android手机上可以下载软件的91手机助手:iOS手机上可以下载软件的AppStore 2. 备份Ubuntu默 ...