linux系统安装elasticsearch服务器

硅谷探秘者 1552 0 0
安装环境:

系统:centos7
java环境:jdk1.8
版本:elasticsearch-7.3.2

elasticsearch下载

官网:https://www.elastic.co/cn/downloads/elasticsearch
博客:https://blog.csdn.net/weixin_37281289/article/details/101483434

将下载的压缩包移动到 /opt/目录下,解压。

tar -zxvf elasticsearch-7.3.2-linux-x86_64.tar.gz

Elasticsearch5.0之后,不能使用root账户启动,所以需要闯创建一个test用户,在test用户中启动

useradd test
chown -R test /elasticsearch-7.3.2
启动elasticsearch
cd /opt/elasticsearch-7.3.2
./bin/elasticsearch

执行启动后出现如下则说明成功:

修改config目录下的elasticsearch.yml配置文件,将network.host配置放开,并配置本机ip。

并重新启动:

执行: curl http://192.168.166.139:9200 

出现上图则安装成功

启动时常见错误

1.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用户,编辑limits.conf 添加类似如下内容

vi /etc/security/limits.conf 

添加如下内容:

* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096

2.max number of threads [1024] for user [lish] likely too low, increase to at least [2048]

解决方案:

切换到root用户,进入limits.d目录下修改配置文件。

vi /etc/security/limits.d/90-nproc.conf 

修改如下内容:

* soft nproc 1024

#修改为

* soft nproc 2048

3.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,即可启动成功。


评论区
请写下您的评论...
暂无评论...
猜你喜欢
框架 1355 软件下载地址:https://pan.baidu.com/s/13gX0ParcOMO_XYcdfSPlzg提取码:9y0e的时候注意jdk和elasticsearch版本问题,本次测试版本
其他 4096 1.卸载apache查看有没有过:yumlist|grephttpd停止:systemctlstophttpd.service卸载httpd:yumerase
linux系统 1836 软件版本:一、linux版本:CentOS-7-x86_64-DVD-1708.iso下载地址:http://mirror.nsc.liu.se/centos-store/7.4.1708
weblog 1021 环境:centos7rabbitmq:rabbitmq-server-3.6.10-1.el7.noarch.rpmsocatyum-yinstallsocat
weblog 1139 centos7版本部署的tomcat,需要将8080端口放开执行如下命令:firewall-cmd--zone=public--add-port=8080/tcp--permanentfirewall
linux 1060 /rabbitmq/erlang-rpm/releases,我下载的版本是23.3.4.6上传到上执行命令:rpm-ivherlang-23.3.4.6-1.el7.x86_64.rpm二、
linux系统 3099 linuxyummysql1.下载并MySQL官方的YumRepository[root@localhost/]#wget-i-chttp://dev.mysql.com/get
apache服务器安装教程 linux 933 1.卸载apache查看有没有过yumlist|grephttpd停止:systemctlstophttpd.service卸载httpd:yumerase
归档
2018-11  12 2018-12  33 2019-01  28 2019-02  28 2019-03  32 2019-04  27 2019-05  33 2019-06  6 2019-07  12 2019-08  12 2019-09  21 2019-10  8 2019-11  15 2019-12  25 2020-01  9 2020-02  5 2020-03  16 2020-04  4 2020-06  1 2020-07  7 2020-08  13 2020-09  9 2020-10  5 2020-12  3 2021-01  1 2021-02  5 2021-03  7 2021-04  4 2021-05  4 2021-06  1 2021-07  7 2021-08  2 2021-09  8 2021-10  9 2021-11  16 2021-12  14 2022-01  7 2022-05  1 2022-08  3 2022-09  2 2022-10  2 2022-12  5 2023-01  3 2023-02  1 2023-03  4 2023-04  2 2023-06  3 2023-07  4 2023-08  1 2023-10  1 2024-02  1 2024-03  1 2024-04  1
标签
算法基础 linux 前端 c++ 数据结构 框架 数据库 计算机基础 储备知识 java基础 ASM 其他 深入理解java虚拟机 nginx git 消息中间件 搜索 maven redis docker dubbo vue 导入导出 软件使用 idea插件 协议 无聊的知识 jenkins springboot mqtt协议 keepalived minio mysql ensp 网络基础 xxl-job rabbitmq haproxy srs 音视频 webrtc javascript
目录
没有一个冬天不可逾越,没有一个春天不会来临。最慢的步伐不是跬步,而是徘徊,最快的脚步不是冲刺,而是坚持。