1、 首页到官方网站下载最新安装包 https://www.elastic.co/downloads/elasticsearch

elasticsearch-5.3.0.tar.gz

2、 将软件包上传到 /usr/local/mypackages/ 目录下。

3、 将软件解压到 /usr/local 目录下。

# tar -xzvf elasticsearch-5.3.0.tar.gz -C /usr/local

4、 将文件夹 elasticsearch-5.3.0 重命名为 elasticsearch

# mv elasticsearch-5.3.0 elasticsearch

5、 配置elasticsearch

# vim elasticsearch/config/elasticsearch.yml

cluster.name=elasticsearch      #集群名称 只要集群名称相同,将自动构建集群。
node.name=node1 #服务器名称
ttp.port: 9200 #服务端口
network.host: 192.168.33.50 #指定Host

6、 因为安全问题elasticsearch 不让用root用户直接运行,所以要创建新用户。

注:最好直接使用非root帐户进行安装。

useradd elastic
passwd elastic 123456

7、 给新建的用户elastic赋权限。

chown -R elastic /usr/local/elasticsearch
su elastic

8、 切换用户并启动elasticsearch服务。

./elasticsearch -d  #启动服务

然后在浏览器中查看,出现以下信息说明启动成功:

附:启动报错

报错1system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk.

原因:

这是在因为Centos6不支持SecComp,而ES5.x默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。

解决:

修改elasticsearch.yml中配置bootstrap.system_call_filter为false,注意要在Memory下面:

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

报错2

max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

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

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

解决:

# vim /etc/security/limits.conf

* soft nofile 65536
* hard nofile 65536
# vim /etc/security/limits.d/90-nproc.conf

soft nproc 1024
修改为:
soft nproc 2048
# vi /etc/sysctl.conf

添加配置:
vm.max_map_count = 655360

并执行命令:(理论上讲是实时生效,但是我重启后才生效的。)

sysctl -p

报错3memory locking requested for elasticsearch process but memory is not locked

解决:

修改elasticsearch.yml文件中的配置,开放discovery.zen.ping.unicast.hosts及discovery.zen.minimum_master_nodes 。

discovery.zen.ping.unicast.hosts: ["192.168.33.50"]
discovery.zen.minimum_master_nodes: 1

附录1:如果发现多台机器组不成集群,请设置你的防火墙。

-A INPUT -p tcp -m tcp --dport 9100 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 9200 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 9300 -j ACCEPT

CentOS6.5安装Elasticsearch5.3.0的更多相关文章

  1. centos6.8安装cdh5.10.0(离线版)

    Centos6.8安装CDH5 相关包的下载地址: Cloudera Manager地址:http://archive.cloudera.com/cm5/cm/5/ CDH安装包地址:http://a ...

  2. CentOS6.8 安装 Oracle11.2.0.4

    1. 安装操作系统 安装的时候选择中文+英文支持 注意分区: swap sda盘做系统盘 sdb盘做数据盘 配置完成后的服务器分区路径信息: [root@dbserver ~]# df -h File ...

  3. centos6.5安装nginx1.16.0

    参考:   centos7 编译安装nginx1.16.0( 完整版 ) https://blog.csdn.net/weixin_37773766/article/details/80290939  ...

  4. 安装Elasticsearch5.4.0以及head,kibana插件

    可以在网盘中下载也可以去官网下载 网盘: Elasticsearch 地址:http://pan.baidu.com/s/1hrI0AFU elasticsearch-head  地址:http:// ...

  5. centos6.5安装配置zabbix3.0.3

    1.首先要准备LAMP环境. (1)安装php Zabbix 3.0对PHP的要求最低为5.4,而CentOS6默认为5.3.3,完全不满足要求,故需要利用第三方源,将PHP升级到5.4以上 rpm ...

  6. centos6.6安装hadoop-2.5.0(三、完全分布式安装)

    操作系统:centos6.6(三台服务器) 环境:selinux disabled:iptables off:java 1.8.0_131 安装包:hadoop-2.5.0.tar.gz hadoop ...

  7. centos6.6安装hadoop-2.5.0(一、本地模式安装)

    操作系统:centos6.6(一台服务器) 环境:selinux disabled:iptables off:java 1.8.0_131 安装包:hadoop-2.5.0.tar.gz hadoop ...

  8. centos6.6安装hadoop-2.5.0(二、伪分布式部署)

    操作系统:centos6.6(一台服务器) 环境:selinux disabled:iptables off:java 1.8.0_131 安装包:hadoop-2.5.0.tar.gz 伪分布式环境 ...

  9. centos6.6安装hadoop-2.5.0(五、部署过程中的问题解决)

    操作系统:centos6.6 环境:selinux disabled:iptables off:java 1.8.0_131 安装包:hadoop-2.5.0.tar.gz 一.安装过程中会出现WAR ...

随机推荐

  1. 1.7Oob 方法体中的循环也能也能返回值给方法

    public String monthString(int monthNumber){ switch(monthNumber){ case 1: return "january"; ...

  2. python selenium配置

    写该博客时环境 mac 10.14.1 (18B75) python 3.7 pip (不用这个就是了,用pip3) $ pip --version pip 10.0.1 from /Users/wj ...

  3. day7:set和深浅copy

    1,判断字符串是不是空格isspace函数 s1 = ' ' s2 = ' ssss' print(s1.isspace()) print(s2.isspace()) 运行结果: True False ...

  4. 确界原理 supremum and infimum principle 戴德金定理 Dedekind theorem

    确界原理  supremum and infimum principle  戴德金定理  Dedekind theorem http://www.math.ubc.ca/~cass/courses/m ...

  5. XA Transactions Restrictions on XA Transactions

    小结: 1.innodb支持XA事务: 2.XA协议作为资源管理器(数据库)与事务管理器的接口标准: 3.提交或者回滚的点:必须所有的组件被提交或者被回滚: 4.2阶段 PC-1,TM告知所有RM要准 ...

  6. Window ferformance toolkit 学习

    1.环境配置 2.内存泄露 a. 编写自己的wprp文件: http://msdn.microsoft.com/en-us/library/hh448223.aspx b.启动 @echo off s ...

  7. 内部排序->归并排序->2-路归并排序

    文字描述 假设初始序列有n个记录,则可看成是n个有序的字序列,每个字序列的长度为1,然后两两归并,得到[n/2]个长度为2或1的有序子序列:再两两归并,…, 如此重复,直到得到一个长度为n的有序序列为 ...

  8. 《HTTP - http报文》

    还时推荐一首歌 - 那吾克热<纸飞机> 有没有突然想要个孩子的冲动,哈哈. 读 第三章<HTTP报文内的HTTP信息> 总结 1:用于HTTP协议交互叫做HTTP报文,请求端( ...

  9. python进程池爬取下载美女图片(xpath)--lowbiprogrammer

    # -*- coding: utf-8 -*-import requests,osfrom lxml import etreeimport multiprocessingfrom retrying i ...

  10. 陌生的 metaclass(转)

    add by zhj:这是我见过的对metaclass解释最清楚的文章了,例子很好,真是一例胜千言 原文:http://wiki.jikexueyuan.com/project/explore-pyt ...