ElasticSearch 6 安装、下载
1,安装配置JDK 8
参考:官方文档
#为什么是JDK1.8?在ElasticSearch6.2.4中提到:JDK版本必须为:1.8.0_131 以上
> 1,安装JDK1.8-161
#解压tar.gz
tar -zxvf jdk-8u161-linux-x64.tar.gz
> 2,配置环境变量
vim /etc/profile.d/dev.sh
# Set Dev Path
JAVA_HOME=/usr/local/java/jdk1.8.0_161/
export JAVA_HOME export PATH=$PATH:$JAVA_HOME/bin
#生效变量
source /etc/profile.d/dev.sh
[root@ gameServer local] java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
2,增加用户(ElasticSearch不允许Root启动)
Root启动异常为:can not run elasticsearch as root
[root@gameServer local] #adduser payment
[root@gameServer local]#passwd payment
Changing password for user payment.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
3,下载ElasticSearch
[payment@gameServer ~]$ cd elasticSearch/
[payment@gameServer elasticSearch]$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.4.tar.gz
--2018-06-05 21:14:44-- https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.4.tar.gz
正在解析主机 artifacts.elastic.co... 54.235.171.120, 54.235.82.130, 23.21.67.46, ...
正在连接 artifacts.elastic.co|54.235.171.120|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:29056810 (28M) [binary/octet-stream]
正在保存至: “elasticsearch-6.2.4.tar.gz” 100%[========================================================================================>] 29,056,810 387K/s in 93s 2018-06-05 21:16:19 (304 KB/s) - 已保存 “elasticsearch-6.2.4.tar.gz” [29056810/29056810]) [payment@gameServer elasticSearch]$ tar -zxvf elasticsearch-6.2.4.tar.gz
[payment@gameServer elasticSearch]$ cd elasticsearch-6.2.4
4,配置ElasticSearch和Linux
[payment@gameServer elasticsearch-6.2.4]$ vim config/elasticsearch.yml
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 172.17.63.15
#
# Set a custom port for HTTP:
#
http.port: 9200
5、 启动ElasticSearch
eg:如果报错不要慌张、随后有解决方案
1>、控制台启动:
[payment@gameServer elasticsearch-6.2.4]$ ./bin/elasticsearch
[2018-06-06T10:29:18,432][INFO ][o.e.n.Node ] [] initializing ...
[2018-06-06T10:29:18,614][INFO ][o.e.e.NodeEnvironment ] [SdEluaQ] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [402.8gb], net total_space [442.7gb], types [rootfs]
[2018-06-06T10:29:18,614][INFO ][o.e.e.NodeEnvironment ] [SdEluaQ] heap size [990.7mb], compressed ordinary object pointers [true]
[2018-06-06T10:29:18,616][INFO ][o.e.n.Node ] node name [SdEluaQ] derived from node ID [SdEluaQkTfi1p-yRtlxHSA]; set [node.name] to override
[2018-06-06T10:29:18,616][INFO ][o.e.n.Node ] version[6.2.4], pid[26954], build[ccec39f/2018-04-12T20:37:28.497551Z], OS[Linux/2.6.32-696.28.1.el6.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_161/25.161-b12]
[2018-06-06T10:29:18,616][INFO ][o.e.n.Node ] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch.lVPlg9Y5, -XX:+HeapDumpOnOutOfMemoryError, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Des.path.home=/home/payment/elasticSearch/elasticsearch-6.2.4, -Des.path.conf=/home/payment/elasticSearch/elasticsearch-6.2.4/config]
[2018-06-06T10:29:19,137][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [aggs-matrix-stats]
[2018-06-06T10:29:19,137][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [analysis-common]
[2018-06-06T10:29:19,137][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [ingest-common]
[2018-06-06T10:29:19,137][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [lang-expression]
[2018-06-06T10:29:19,137][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [lang-mustache]
[2018-06-06T10:29:19,137][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [lang-painless]
[2018-06-06T10:29:19,137][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [mapper-extras]
[2018-06-06T10:29:19,138][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [parent-join]
[2018-06-06T10:29:19,138][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [percolator]
[2018-06-06T10:29:19,138][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [rank-eval]
[2018-06-06T10:29:19,138][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [reindex]
[2018-06-06T10:29:19,138][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [repository-url]
[2018-06-06T10:29:19,138][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [transport-netty4]
[2018-06-06T10:29:19,138][INFO ][o.e.p.PluginsService ] [SdEluaQ] loaded module [tribe]
[2018-06-06T10:29:19,139][INFO ][o.e.p.PluginsService ] [SdEluaQ] no plugins loaded
[2018-06-06T10:29:21,350][INFO ][o.e.d.DiscoveryModule ] [SdEluaQ] using discovery type [zen]
[2018-06-06T10:29:21,752][INFO ][o.e.n.Node ] initialized
[2018-06-06T10:29:21,752][INFO ][o.e.n.Node ] [SdEluaQ] starting ...
[2018-06-06T10:29:21,845][INFO ][o.e.t.TransportService ] [SdEluaQ] publish_address {172.17.63.15:9300}, bound_addresses {172.17.63.15:9300}
[2018-06-06T10:29:21,851][INFO ][o.e.b.BootstrapChecks ] [SdEluaQ] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2018-06-06T10:29:24,903][INFO ][o.e.c.s.MasterService ] [SdEluaQ] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {SdEluaQ}{SdEluaQkTfi1p-yRtlxHSA}{e6G8iUkmRNerO3aI9nqZnA}{172.17.63.15}{172.17.63.15:9300}
[2018-06-06T10:29:24,907][INFO ][o.e.c.s.ClusterApplierService] [SdEluaQ] new_master {SdEluaQ}{SdEluaQkTfi1p-yRtlxHSA}{e6G8iUkmRNerO3aI9nqZnA}{172.17.63.15}{172.17.63.15:9300}, reason: apply cluster state (from master [master {SdEluaQ}{SdEluaQkTfi1p-yRtlxHSA}{e6G8iUkmRNerO3aI9nqZnA}{172.17.63.15}{172.17.63.15:9300} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
[2018-06-06T10:29:24,921][INFO ][o.e.h.n.Netty4HttpServerTransport] [SdEluaQ] publish_address {172.17.63.15:9200}, bound_addresses {172.17.63.15:9200}
[2018-06-06T10:29:24,921][INFO ][o.e.n.Node ] [SdEluaQ] started
[2018-06-06T10:29:25,048][INFO ][o.e.g.GatewayService ] [SdEluaQ] recovered [0] indices into cluster_state
2、控制台启动下:停止(Ctrl+C)
^C[2018-06-06T10:49:13,825][INFO ][o.e.n.Node ] [SdEluaQ] stopping ...
[2018-06-06T10:49:13,864][INFO ][o.e.n.Node ] [SdEluaQ] stopped
[2018-06-06T10:49:13,865][INFO ][o.e.n.Node ] [SdEluaQ] closing ...
[2018-06-06T10:49:13,876][INFO ][o.e.n.Node ] [SdEluaQ] closed
[payment@gameServer elasticsearch-6.2.4]$
3、后台启动
[payment@gameServer elasticsearch-6.2.4]$ ./bin/elasticsearch -d
[payment@gameServer elasticsearch-6.2.4]$
4、验证
[payment@gameServer elasticsearch-6.2.4]$ curl "http://172.17.63.15:9200"
{
"name" : "SdEluaQ",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "Oz0crt7uRTeVgPX0EFZ3Kg",
"version" : {
"number" : "6.2.4",
"build_hash" : "ccec39f",
"build_date" : "2018-04-12T20:37:28.497551Z",
"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"
}
本机浏览器中:
如果访问不通:请确保能ping通 es配置的IP
6、安装相关问题汇总:
1>、Centos6 安装启动失败:
ERROR: [1] bootstrap checks failed
[1]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
解决方案 参考文档:
[payment@gameServer elasticsearch-6.2.4]$ vim config/elasticsearch.yml
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
2>、ERROR: 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用户修改
vim /etc/security/limits.conf
添加如下内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
3>、max number of threads [1024] for user [lish] likely too low, increase to at least [4096]
解决方案:Root用户修改
vim /etc/security/limits.d/90-nproc.conf
* soft nproc 4096
root soft nproc unlimited
4>,最大虚拟内存区域vm.max_map_count [65530]可能太低,增加到至少[262144]
解决方案:根用户修改
vim /etc/sysctl.conf
#添加如下配置并保存
vm.max_map_count = 655360
[root @ gameServer〜]#sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
vm.max_map_count = 655360
ElasticSearch 6 安装、下载的更多相关文章
- 搞定 ElasticSearch系列一 下载安装
一.安装jdk 二.安装ElasticSearch 1.ElasticSearch下载地址: 2: 配置ElasticSearch 3:启动ElasticSearch 4: 安装ElasticSear ...
- 如何在Elasticsearch中安装中文分词器(IK+pinyin)
如果直接使用Elasticsearch的朋友在处理中文内容的搜索时,肯定会遇到很尴尬的问题--中文词语被分成了一个一个的汉字,当用Kibana作图的时候,按照term来分组,结果一个汉字被分成了一组. ...
- Linux初学 - Elasticsearch环境安装
下载 https://www.elastic.co/downloads/elasticsearch 安装 rpm -ivh 也可以双击rpm包安装 修改elastaticsearch host配置 修 ...
- centos 6.7下 elasticsearch的安装
1.下载elasticsearch的安装包,用ftp上传到linux系统下目录中,如在当前用户root的目录下新建目录elasticsearch,放入安装包 不要忘了添加执行权限 chmod +x * ...
- 转:ElasticSearch的安装和相关插件的安装
原文来自于:http://blog.csdn.net/whxaing2011/article/details/18237733 本文主要介绍如下内容: 1.ElasticSearch ...
- ElasticSearch的安装
一.安装javaSE环境(已配java环境变量的请直接跳过) 1.从Java JDK 官网下载适合自己的jdk版本.(我自己用的jdk1.7) 2.安装jdk后,配置java环境变量(ps:比较喜欢简 ...
- elasticsearch 的安装配置与spring boot的整合应用
linux上的elasticsearch安装 一.下载elasticsearch 直接进入elasticsearch的官网,下载最新的安装包:https://www.elastic.co/downlo ...
- Centos7部署elasticsearch并且安装ik分词以及插件kibana
第一步 下载对应的安装包 elasticsearch下载地址:https://www.elastic.co/cn/downloads/elasticsearch ik分词下载:https://gith ...
- ElasticSearch的安装、使用、踩坑
最近博客写的少了. 本篇介绍在安装ElasticSearch和head插件的过程中遇到的小问题,和一些日常使用的操作(简单搜索语法.分片管理). ElasticSearch 它是一个实时分布式搜索和分 ...
- elasticsearch插件安装之--linux下安装及head插件
/** * 系统环境: vm12 下的centos 7.2 * 当前安装版本: elasticsearch-2.4.0.tar.gz */ 安装和学习可参照官方文档: 1, 安装 # 下载, 获取不成 ...
随机推荐
- spice在桌面虚拟化中的应用系列之一(spice简介,性能优化等)
1.spice介绍 1.1 spice简介 spice是由Qumranet开发的开源网络协议,2008年红帽收购了Qumranet获得了这个协议.SPICE是红帽在虚拟化领域除了KVM的又一“新兴技术 ...
- Chkdsk /f 修复无法识别EXFAT卷文件系统
Chkdsk 工具将错误地报告为损坏的 Windows 7 和 Windows Server 2008 R2 中 exFAT 卷文件系统 适用于: Windows Server 2008 R2 Ser ...
- Go语言中的数据格式(json、xml 、msgpack、protobuf)
在分布式的系统中,因为涉及到数据的传输,所以一定会进行数据的交换,此时就要定义数据交换的格式,例如二进制.Json.Xml等等.本篇文章就是总结一下常用的几种数据格式. 一.Json格式 如果想使用J ...
- Gym - 102012H Rikka with A Long Colour Palette N线段K色贪心染色
给你数轴上的N条线段和K种颜色 K和N1e5 要你把这N条线段染色 使得有K种不同颜色的线段长度最长 首先很容易想到被至少K段线段覆盖的区间是一定有贡献的 接下来就是怎么染色的问题 我们把这N个区间的 ...
- 本地python环境检查,插件检查及插件安装
电脑windows键+r 输入cmd 在python命令模式下 pip list --可以查看已安装的插件情况 或者用 pip freeze 也可以 卸载插件:pip uninstall *** ...
- Django之路——2 Django的安装
Django的安装分为两种方式,一种是命令行安装,另外一种是pycharm安装.在这里只说一种在命令行里面安装的 1.命令行安装 这个自不必多说,直接上干货,如果遇到pip版本过低,安装失败的,请自自 ...
- 0019SpringBoot使用异步任务(多线程)与定时任务
SpringBoot开启异步任务只需要两步配置: 1.在主类上加上注解@EnableAsync开启异步功能 2.在service层的方法上加上注解@Async指定调用方法时是异步的 SpringBoo ...
- Git报错:Please tell me who you are.
Git在提交的时候报错 Please tell me who you are. 报错 Please tell me who you are. 具体如下: 原因:明确报错.请告诉我你是谁.意思是你在提交 ...
- sql server update....set.... from ....where....
工作中遇到的 update 的更新方法 以前update 表 set 列 = 新值 稍稍进阶 update 表 set 列 = (select 值 from 表 where ...) ...
- Linux 文件系统缓存dirty_ratio与dirty_background_ratio两个参数区别
文件系统缓存dirty_ratio与dirty_background_ratio两个参数区别 (2014-03-16 17:54:32) 转载▼ 标签: linux 文件系统缓存 cache dirt ...