面试官:这些错误都没见过,还敢说会安装Elasticsearch?
发布日期:2021-05-11 06:57:48 浏览次数:8 分类:博客文章

本文共 10591 字,大约阅读时间需要 35 分钟。

������

������

������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ like ������������������������������������������������������������������������������������������������������������������������������������������������ MySQL������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

��������� Elasticsearch

Elasticsearch ��������������� Apache Lucene ���������������������������������������������������������������������������������search���������������analysis������

Elasticsearch ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Elasticsearch ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

������ Apache Lucene

Apache Lucene ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

Lucene ��������������� Doug Cutting��������������������� Java ������������������ 2001 ���������������Lucene ������������������������������������������������������ Apache���������������Apache Lucene ��������������� C++ ���C#���Python ������������������

Apache Lucene ������������������������������������������������������������������������������������������ ElasticSearch ���������Solr ������������ Apache Lucene ������������������������������������ MySQL ������������������Lucence ������������������������������ ElasticSearch ��� Solr ������������ MySQL ������������������

������������

������������ Elasticsearch ������������������������������������������������������������������������������������������������������������������������ Elasticsearch ������������������������

  • ���������index���������������������������������������������������
  • ���������������mapping type��������������������������������������������������� 7.x ��������������������������������������������� 8.x ���������������������������
  • ���������document������������������������������������������������������
  • ������field������������������������������������������������
  • ���������mapping��������������������������������������������������������������������������������������������������������������������������������� mapping������������������������

��������������� mapping type

������ mapping type ������������������������

  • ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ElasticSearch ������������������ index ��������������� mapping type ��������������������������������������������������������� Lucence ��������������������������������������������������������������������������������������������������������������������������������� mapping������������������������������������������������������������������������������������������������
  • ������������ index ��������������������������������������������� mapping type ��������������������������������� Lucene ������������������������������������������������������������������

��������� mapping type ��������������������������������������������������������������������������������� index ��������������������������� mapping type ���������������������������������������������

  • ��������������������������������������������������������� Lucene ���������������������������
  • ���������������������������������������������������������������������������������������������������������������������������

Elasticsearch ������������������

������ Elasticsearch ������������������������������������������������������������������������������������������������������������������������������ Elasticsearch ��� Java ��������������������� 1.8 ������������������������������������������������ root ������������������������������������������������

��������� Elasticsearch ��������������������������� ES_HOME ���������

��������������� tar.gz ������ zip ������������������������������������������ $ES_HOME/config ��������������������������������������������� ES_PATH_CONF ���������������������������������������config ���������������������������������������������

  • elasticsearch.yml������������������������
  • jvm.options���jvm ���������������
  • log4j2.properties������������������������

������������������������

������ Elasticsearch���������������������������������������������������������������������������������������������������������������

������ data ��� log

������ data ������ log ��������������������������������������������������������� $ES_HOME���

path:    data: /var/lib/elasticsearch    logs: /var/log/elasticsearch

������ data ������������������������������������������������������������������������������

path:  data:    - /mnt/elasticsearch_1    - /mnt/elasticsearch_2    - /mnt/elasticsearch_3

���������������������cluster name���

��������������� Elasticsearch ��������������������������������������������������������������������������� elasticsearch������������������������������������

cluster.name: logging-prod

������������������node name���

��������������������������������������������� API ��������������� Response ���������������������������������������������������������������������������������������������������������������

node.name: prod-data-2

������������ ip

��������������������������������������������������� ip������������������������������������������������������������������������������������������������������������

network.host: 192.168.1.10

��������������������������������������������������������������������� 0.0.0.0���

������������������������������������������ 0.0.0.0 ���������������������������non-loopback address������������ Elasticsearch ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

bootstrap check failure [1] of [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

������������������

non-loopback address ������������������������������������������������������ 127 ��������� ip ������������������������������������������������������������ 127.0.0.1���ipv6 ��������������� ::1��������������������� localhost��������������������������������� 127.0.0.1 ��������� localhost������������������������������������ 127.0.0.1������ 127.0.0.1 ��������������������� localhost���������������������������������

������������������������

��������������������������������� network.host ������������������������������������������Elasticsearch ������������������������������������������������������������������������������������������������������

������ discovery.seed_hosts

���������������������Elasticsearch ������������������������������������������������ Elasticsearch ������������������������������������������ 9300 ��� 9305 ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ discovery.seed_hosts ������������ ip ������������������������������������������������������ 9300������������ ivp6 ��������������� []������

discovery.seed_hosts:   - 192.168.1.10:9300   - 192.168.1.11   - seeds.mydomain.com    - [0:0:0:0:0:ffff:c0a8:10c]:9301

������������������������������������������������������������������ ip ������Elasticsearch ��������������������� ip���

������ discovery.seed_providers

��������������� discovery.seed_hosts ��������������������������������������������� master ��������������������������������������� master ������������ node-master���true ��������������������������������������������������������������� discovery.seed_providers ���������������������������������������������������������������������������������������������������������������������������������������������������������

������ cluster.initial_master_nodes

��������������� Elasticsearch ������������������������������������������������������������ master ��������������������������������������������������������� discovery ������������������������������������������ Elasticsearch ��������������������������������������������������������������������������������������������������������������������������������������������������������������� master ������������������������������������������������������������������������

PS��������������������������������������������� node.name ���������������

������

���������������������������������������������������������������������������������������������

network.host: 0.0.0.0node.name: node-1cluster.initial_master_nodes: ["node-1"]

��������������������������������������� bin ��������������� ./elasticsearch ������������������������������������������������������������������ ./elasticsearch -d ���������

��������������������������� 9200��������� http://ip:9200 ������������������������������������������

���������������������

������������������������������������������ max_map_count������������������������������������

bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

������������ Elasticsearch ������������������ mappfs ��������������������������������������������������������� mmap ������������������������������������������������������������������������ RPM ������������������������������������

��� Linux ������������������������ sysctl -w vm.max_map_count=262144 ��������������������������������������� sysctl vm.max_map_count ��������������������������������������������������� vim /etc/sysctl.conf ��������������������������������������� sysctl -p ���������������������

������

������������������������������ Elasticsearch ������������������������ Apache Lucene ��������������������������������� Elasticsearch ������������������������������������������������������������������������ Elasticsearch ������������������������������������������������������ Elasticsearch ������������������������������������������������������ Elasticsearch ������������������

上一篇:前端数据结构--二叉树先序、中序、后序 递归、非递归遍历
下一篇:『动善时』JMeter基础 — 12、JMeter取样器详解:sampler

发表评论

最新留言

不错!
[***.144.177.141]2025年04月04日 21时42分06秒