以下是镇楼用的,各路退让,我要吹liubi 了

//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
// | | \\\ - /// | |
// | \_| ''\---/'' |_/ |
// \ .-\__ '-' ___/-. /
// ___'. .' /--.--\ `. .'___
// ."" '< `.___\_<|>_/___.' >' "".
// | | : `- \`.;`\ _ /`;.`/ - ` : | |
// \ \ `_. \_ __\ /__ _/ .-` / /
// =====`-.____`.___ \_____/___.-`___.-'=====
// `=---='
//
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// 佛祖保佑 永无BUG
//
//
//

es 安装之单节点和多节点模式安装

es 单节点模式安装

(Elastic 是java 写的搜索和分析引起,依赖jdk安装)
单节点安装:
I, 到Elasticsearch 官网上,把安装包下载到本地, II, 解压tar包,并且配置conf 目录下面的elasticsearch.yml
目录内容大致如下:
[root@master elastic]# ls
bin config data lib LICENSE.txt modules NOTICE.txt plugins
[root@master elastic]# ls config/
elasticsearch.yml jvm.options log4j2.properties scripts
[root@master elastic]# III, 把tar 包的文件和目录改成非root 用户。es 建议不要使用root 用户启动。
[root@master elastic]# ll
total 228
drwxr-xr-x 2 elsearch elsearch 4096 Jun 15 15:47 bin
drwxr-xr-x 3 elsearch elsearch 4096 Jun 15 15:57 config
drwxr-xr-x 3 elsearch elsearch 4096 Jun 15 16:01 data
drwxr-xr-x 2 elsearch elsearch 4096 Jun 15 15:47 lib
-rwxr-xr-x 1 elsearch elsearch 11358 Jun 15 15:47 LICENSE.txt
drwxr-xr-x 13 elsearch elsearch 4096 Jun 15 15:47 modules
-rwxr-xr-x 1 elsearch elsearch 194187 Jun 15 15:47 NOTICE.txt
drwxr-xr-x 3 elsearch elsearch 4096 Jun 15 15:47 plugins
[root@master elastic]# IV, 启动ElasticSearch
./bin/elasticsearch 或者./bin/elasticsearch -d elastic 的配置文档如下参考如下:
单节点elasticsearch.yml 配置
cluster.name: my-cluser
node.name: s100
network.host: 192.168.1.132
http.port: 9200
#http.cors.enabled: true
#http.cors.allow-origin: "*"
#node.master: true
#node.data: true
#discovery.zen.ping.unicast.hosts: ["s100", "s101","s102"]
bootstrap.system_call_filter: false

集群安装模式

参考单节点配置,

每个节点的配置模板如下:

有问题欢迎来战,哦不,欢迎来撩,哦不,欢迎来问。

cluster.name: my-cluser
node.name: s100 --------> 对应每个节点,需要配置成相应的hostname, 或者ip
network.host: 192.168.1.132 --------> 对应每个节点,需要配置成相应的hostname, 或者ip
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true
discovery.zen.ping.unicast.hosts: ["s100", "s101","s102"]
bootstrap.system_call_filter: false

启动需要到每一个节点上面进行启动es 服务。启动方式和单节点启动一样。

注意启动如果报错,请到安装目录的log目录下查看错误日记,然后,度娘去吧。

常见问题以及解决方案如下:

问题一:

[2016-11-06T16:27:21,712][WARN ][o.e.b.JNANatives ] unable to install syscall filter:

Java.lang.UnsupportedOperationException: seccomp unavailable: requires kernel 3.5+ with CONFIG_SECCOMPandCONFIG_SECCOMP_FILTERcompiledinatorg.elasticsearch.bootstrap.Seccomp.linuxImpl(Seccomp.java:349) ~[elasticsearch-5.0.0.jar:5.0.0]

at org.elasticsearch.bootstrap.Seccomp.init(Seccomp.java:630) ~[elasticsearch-5.0.0.jar:5.0.0]

原因:报了一大串错误,大家不必惊慌,其实只是一个警告,主要是因为你Linux版本过低造成的。

解决方案:
1、重新安装新版本的Linux系统
2、警告不影响使用,可以忽略 问题二:
ERROR: bootstrap checks failed max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536] 原因:无法创建本地文件问题,用户最大可创建文件数太小 解决方案:
切换到root用户,编辑limits.conf配置文件, 添加类似如下内容: vi /etc/security/limits.conf 添加如下内容:
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
备注:* 代表Linux所有用户名称(比如 hadoop) 保存、退出、重新登录才可生效 问题三:
max number of threads [1024] for user [es] likely too low, increase to at least [2048]
原因:无法创建本地线程问题,用户最大可创建线程数太小
解决方案:切换到root用户,进入limits.d目录下,修改90-nproc.conf 配置文件。 vi /etc/security/limits.d/90-nproc.conf 找到如下内容: * soft nproc 1024 #修改为 * soft nproc 2048 问题四:
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
原因:最大虚拟内存太小
解决方案:切换到root用户下,修改配置文件sysctl.conf vi /etc/sysctl.conf 添加下面配置: vm.max_map_count=655360 并执行命令: sysctl -p 然后重新启动elasticsearch,即可启动成功。 问题五:
ElasticSearch启动找不到主机或路由
原因:ElasticSearch 单播配置有问题
解决方案:
检查ElasticSearch中的配置文件
vi config/elasticsearch.yml
找到如下配置: discovery.zen.ping.unicast.hosts:["192.168.**.**:9300","192.168.**.**:9300"]
一般情况下,是这里配置有问题,注意书写格式 问题六:
org.elasticsearch.transport.RemoteTransportException: Failed to deserialize exception response from stream 原因:ElasticSearch节点之间的jdk版本不一致 解决方案:ElasticSearch集群统一jdk环境 问题七:
Unsupported major.minor version 52.0 原因:jdk版本问题太低
解决方案:更换jdk版本,ElasticSearch5.0.0支持jdk1.8.0 问题八:
bin/elasticsearch-plugin install license
ERROR: Unknown plugin license 原因:ElasticSearch5.0.0以后插件命令已经改变
解决方案:使用最新命令安装所有插件
bin/elasticsearch-plugin install x-pack [2017-07-21T07:47:02,855][INFO ][o.e.b.BootstrapChecks ] [node-1] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
ERROR: [1] bootstrap checks failed
[1]: max size virtual memory [3313172480] for user [es] is too low, increase to [unlimited] 启动的时候:
ulimit -v unlimited

最后,不用太感谢了哦。

最新文章

  1. (转)名称和本质 by王珢
  2. 夺命雷公狗-----React---20--实现验证码大写
  3. regular expressions
  4. How to adjust OOM score for a process?
  5. bzoj4011
  6. B - Broken Keyboard (a.k.a. Beiju Text)
  7. 摄像头参数查看与调节 分类: C/C++ OpenCV 2014-11-08 18:13 138人阅读 评论(0) 收藏
  8. 乞讨N!到底有多少0
  9. JAX-WS创建和处理SOAP消息
  10. javascript 私有方法的实现
  11. Android Studio 真机调试 连接手机
  12. js获取时间相关函数
  13. CF数据结构练习(二)
  14. HTML、CSS(小笔记)
  15. js引用值传递改变问题(使用深拷贝)
  16. 实现加载Tomcat服务器中的图片,并且有进度条提示进度
  17. gitolite的部署
  18. jquery快速获得url 的get传值
  19. CSS文字超出指定长度,用省略号
  20. 使用Winform程序作为WCF服务的宿主

热门文章

  1. Jquery插件之ajaxForm简介
  2. 基于Python3 神经网络的实现
  3. spring-cloud构架微服务(2)-全局配置二
  4. 建立本地yum源
  5. 【CCPC-Wannafly Winter Camp Day4 (Div1) G】置置置换(动态规划)
  6. 2016 Al-Baath University Training Camp Contest-1
  7. 打表格,字符串处理,POJ(2136)
  8. [Pytorch] pytorch笔记 &lt;二&gt;
  9. python导入其他文件夹下的.py文件
  10. 2018年第九届蓝桥杯【C++省赛B组】第二题 明码