没错,从零开始的elasticsearch搭建教程开始了!h"h ** 原文:https://www.cnblogs.com/heermayou/p/12670662.html 那么首先假设 你已经装好了一个Centos系统 ,我
没错,从零开始的elasticsearch搭建教程开始了!h"h **
原文:https://www.cnblogs.com/heermayou/p/12670662.html
那么首先假设 你已经装好了一个Centos系统 ,我的是centos6.7的
地址: Https://www.elastic.co/cn/downloads/past-releases#elasticsearch
我下的是7.5.2
tar -zxvf elasticsearch-7.5.2-linux-x86_64.tar.gz
linux中 elasticsearch不能以root用户启动
所以先建一个普通用户
adduser username
更改文件夹所属权
chown -R username ./elasticsearch-7.5.2
进入已经解压好的elasticsearch 的目录中
cd elasticsearch-7.5.2/
切换用户:
su username
启动elasticsearch
./bin/elasticsearch
这里来说一般都会成功,如果本的配置了JAVA_HOME的环境路径,
而且java的版本比较低的话启动就会失败,elasticsearch中有jdk的版本最好使用该版本的jdk
vi bin/elasticsearch
在开始的位置加入:
export JAVA_HOME=/opt/program/elasticsarch/elasticsearch-7.5.2/jdk #(此处es的jdk所在目录)
export PATH=$JAVA_HOME/bin:$PATH
:wq 保存并退出
然后再次启动,完美成功!
ctrl + c 关闭运行
然后加载参数
sysctl -p 继续启动可能报的错误: [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535] [2]: max number of threads [1024] for user [elastic] is too low, increase to at least [4096] [3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] [4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk [5]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured .打开/etc/security/limits.conf,在里面添加如下内容* soft nofile 65536
* hard nofile 65536
此处不行还要修改 /etc/security/limits.d/90-nproc.conf * soft nproc 1024 将上面修改为: * soft nproc 2048 其中*表示所有用户 nofile表示最大文件句柄数,表示能够打开的最大文件数目再次启动出现下列错误时: ERROR: [2] 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 [2]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] mu
修改elastic search.yml文件加入:
再次出现以下错误时: ERROR: [1] bootstrap checks failed [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured 修改elasticsearch.yml文件加入: cluster.initial_master_nodes: ["node-1"] 再次启动应该就ok了。。。
--结束END--
本文标题: elasticsearch7.5安装遇到的坑
本文链接: https://www.lsjlt.com/news/5458.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-16
2024-05-16
2024-05-16
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0