ElasticSearch6.X 下载与安装

1.ElasticSearch 对 jdk版本要求

ES          JDK
0.90        1.6
----------------
1.3         1.7
...         1.7
2.4         1.7
----------------
5.0         1.8     
...         1.8
6.X         1.8
...         ...
 ?           ? 

2.jdk配置
请参考:centOS 7.4 安装配置jdk1.8
3.(1)ElasticSearch6.2.3 下载
也可在官网下载后上传

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

这里写图片描述
(2)解压缩

 tar -zxvf elasticsearch-6.2.3.tar.gz

(3)创建用户
从5.0开始,ElasticSearch 安全级别提高了,不允许采用root帐号启动,所以我们要添加一个用户。

useradd www            # 创建用户
passwd www             # 设置该用户名密码

(4)修改目录权限

chmod 777 -R elasticsearch-6.2.3

(5)切换用户启动

su www
./elasticsearch-6.2.3/bin/elasticsearch

自动关闭,报错啦。。。

ERROR: [1] bootstrap checks failed
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
max number of threads [1024] for user [lishang] likely too low, increase to at least [2048]

解决:切换到root用户,
(1)编辑limits.conf 添加类似如下内容

vi /etc/security/limits.conf 

添加如下内容:

* hard nofile 65536
* soft nofile 65536

* soft nproc 2048
* hard nproc 4096

# End of file

(2)修改/etc/sysctl.conf
添加如下内容

vm.max_map_count=262144

再次启动成功啦。。。
(6)停止

ctrl+c
^C[2018-03-24T23:17:30,185][INFO ][o.e.n.Node               ] [VG9Zem6] stopping ...
[2018-03-24T23:17:30,205][INFO ][o.e.n.Node               ] [VG9Zem6] stopped
[2018-03-24T23:17:30,205][INFO ][o.e.n.Node               ] [VG9Zem6] closing ...
[2018-03-24T23:17:30,213][INFO ][o.e.n.Node               ] [VG9Zem6] closed

(7)后台启动

./bin/elasticsearch -d

(8)查看进程

jps

1925 Jps
1882 Elasticsearch
或者:
ps -ef|grep elasticsearch

(8).验证
使用curl

curl http://localhost:9200
{
  "name" : "VG9Zem6",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "9QO-zLXJRJyzbW9cJM2dLQ",
  "version" : {
    "number" : "6.2.3",
    "build_hash" : "c59ff00",
    "build_date" : "2018-03-13T10:06:29.741383Z",
    "build_snapshot" : false,
    "lucene_version" : "7.2.1",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

大痴小乙

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值