首页 > 其他分享 >ELK学习记录 - elasticsearch 7.9.1安装

ELK学习记录 - elasticsearch 7.9.1安装

时间:2024-03-24 20:11:07浏览次数:35  
标签:node ELK JAVA elasticsearch bin HOME 7.9

说明:以7.9.1版本为例,运行环境 Rocky Linux release 9.3

elasticsearch下载:https://mirrors.huaweicloud.com/elasticsearch/7.9.1/elasticsearch-7.9.1-linux-x86_64.tar.gz

解压:$ tar -xf elasticsearch-7.9.1-linux-x86_64.tar.gz

修改配置文件:

$ cd elasticsearch-7.9.1/
$ vi config/elasticsearch.yml
cluster.name: my-es
node.name: node-1

network.host: 0.0.0.0

http.port: 9200
$ vi config/jvm.options

-Xms128m
-Xmx128m

 

$ curl http://127.0.0.1:9200
{
  "name" : "node-1",
  "cluster_name" : "my-es",
  "cluster_uuid" : "EJoRMPWrQt-vYB88Xe9h7Q",
  "version" : {
    "number" : "7.9.1",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "083627f112ba94dffc1232e8b42b73492789ef91",
    "build_date" : "2020-09-01T21:22:21.964974Z",
    "build_snapshot" : false,
    "lucene_version" : "8.6.2",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

 

常遇问题1:使用自带JDK

备份:bin]$ cp elasticsearch-env elasticsearch-env-bak
vi elasticsearch-env
# now set the path to java
if [ ! -z "$JAVA_HOME" ]; then
  JAVA="$JAVA_HOME/bin/java"
  JAVA_TYPE="JAVA_HOME"
else
  if [ "$(uname -s)" = "Darwin" ]; then
    # macOS has a different structure
    JAVA="$ES_HOME/jdk.app/Contents/Home/bin/java"
  else
    JAVA="$ES_HOME/jdk/bin/java"
  fi
  JAVA_TYPE="bundled jdk"
fi

改为
# now set the path to java
  # use the bundled JDK (default)
  if [ "$(uname -s)" = "Darwin" ]; then
    # macOS has a different structure
    JAVA="$ES_HOME/jdk.app/Contents/Home/bin/java"
  else
    JAVA="$ES_HOME/jdk/bin/java"
  fi
  JAVA_TYPE="bundled JDK"
View Code

 

 

常遇问题2:启动是报虚拟内存异常使用自带JDK

$ ./bin/elasticsearch

[2024-03-24T19:51:16,861][INFO ][o.e.b.BootstrapChecks ] [node-1] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [2] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2]: 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
ERROR: Elasticsearch did not exit normally - check the logs at /usr/dog/elk/elasticsearch-7.9.1/logs/my-es.log
[2024-03-24T19:51:16,869][INFO ][o.e.n.Node ] [node-1] stopping ...
[2024-03-24T19:51:16,881][INFO ][o.e.n.Node ] [node-1] stopped
[2024-03-24T19:51:16,882][INFO ][o.e.n.Node ] [node-1] closing ...
[2024-03-24T19:51:16,902][INFO ][o.e.n.Node ] [node-1] closed
[2024-03-24T19:51:16,904][INFO ][o.e.x.m.p.NativeController] [node-1] Native controller process has stopped - no new native processes can be started

#使用root修改主机虚拟内存最大映射数
# vi /etc/sysctl.conf

# 增加如下配置

vm.max_map_count = 262144

# 重新加载配置/etc/sysctl.conf
# sysctl -p
View Code

 

标签:node,ELK,JAVA,elasticsearch,bin,HOME,7.9
From: https://www.cnblogs.com/jackbond/p/18092951

相关文章

  • ElasticSearch的安装(Linux版)
    1.获取安装资源(文末有文件)https://www.elastic.co/cn/downloads/elasticsearch2.上传文件并解压cd/opttar-xfelasticsearch-7.8.0-linux-x86_64.tar.gzrm-rfelasticsearch-7.8.0-linux-x86_64.tar.gz3.创建普通用户并授权#新增user用户useradduser......
  • 15,zabbix-elk
    1、安装logstash2、监控/home/elk/test.log文件[[email protected]]#[[email protected]]#ifconfigeth0:flags=4163<UP,BROADCAST,RUNNING,MULTICAST>mtu8500inet10.206.16.11netmask255.255.240.0broadcast10......
  • [c++/gcc] Centos 7.9升级 gcc 4.8.5 到 gcc11 [转]
    0序本文背景:因在centos7.9server上安装nodejs21.7.1,编译nodejs时,依赖了gnu17/gcc11。例如:遇到Qtrequiresc++11support、-std=gnu++17例如:编译器不支持c++17,就会提示:g++:error:unrecognizedcommandlineoption‘-std=c++17’例如:编译器不支持c++17,就会提示:g++:......
  • 2023-5-11-elasticsearch使用
    索引操作、数据操作索引操作索引的创建、删除等创建索引PUT/shopping{"acknowledged":true,"shards_acknowledged":true,"index":"shopping"}获取索引详细信息GET/_cat/indices?vhealthstatusindexuuid......
  • CentOS7.9 搭建本地Yum源仓库
    一、背景        在公司的生产环境中,服务器一般处于内网,而我们想在这样的服务器上安装软件时会出现无法访问Internet从而导致依赖安装失败的问题,今天我们通过配置离线YUM源仓库来解决类似问题。二、查看系统版本[root@superset~]#cat/etc/redhat-releaseCentOS......
  • Docker-compose安装Elasticsearch启动报错(挂载volume后)
    错误提示:"stacktrace":["org.elasticsearch.bootstrap.StartupException:ElasticsearchException[failedtobindservice];nested:AccessDeniedException[/usr/share/elasticsearch/data/nodes];"docker-compose.yamldocker-compose.yamlversion:......
  • ELK - Win10上使用Docker搭建ES集群
    Win10上使用Docker搭建ES集群ElasticSearch离线镜像包http://www.elastic-view.cn/index.htmlES可视化管理工具http://www.elastic-view.cn/index.html单机单节点启动命令:dockerrun-d--nameelasticsearch-p9200:9200-p9300:9300-enode.name=elasticsearch......
  • elasticsearch 6.8 常用数据字段类型
    在es中,字段类型主要有以下几种:ArraysBinarydatatypeRangedatatypesBooleandatatypeDatedatatypeGeo-pointdatatypeGeo-ShapedatatypeIPdatatypeKeyworddatatypeNesteddatatypeNumericdatatypesObjectdatatypeTextdatatypeTokencountdatatypePercol......
  • MAC安装elasticsearch-head插件
    1.下载插件源码gitclonehttps://github.com/mobz/elasticsearch-head.git2.进入文件夹npminstall3.安装npminstall4.启动npmrunstart5.访问http://localhost:910......
  • TorchV的RAG实践分享(二):基于ElasticSearch的混合检索实战&原理分析
    概述在昨天员外分享的《TorchV的RAG实践分享(1)——RAG的定位、技术选型和RAG技术文章目录》一文中介绍了TorchV的由来,也分享了我们的几个基线产品和应用架构的方向,我们想的是在创业的过程中,将我们自己的一些产品理念、技术心得都通过公众号发文的方式分享出来,更多的和行业内的专家......