{"id":20673001,"url":"https://github.com/relph1119/elasticsearch-in-a-nutshell","last_synced_at":"2025-04-19T19:12:07.341Z","repository":{"id":244421046,"uuid":"815195348","full_name":"Relph1119/elasticsearch-in-a-nutshell","owner":"Relph1119","description":"《一本书讲透Elasticsearch》学习笔记","archived":false,"fork":false,"pushed_at":"2024-06-17T14:36:12.000Z","size":8112,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-18T14:09:12.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://relph1119.github.io/elasticsearch-in-a-nutshell/#/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Relph1119.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-14T14:59:07.000Z","updated_at":"2024-06-17T14:36:16.000Z","dependencies_parsed_at":"2024-06-14T16:44:26.585Z","dependency_job_id":null,"html_url":"https://github.com/Relph1119/elasticsearch-in-a-nutshell","commit_stats":null,"previous_names":["relph1119/elasticsearch-in-a-nutshell"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relph1119%2Felasticsearch-in-a-nutshell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relph1119%2Felasticsearch-in-a-nutshell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relph1119%2Felasticsearch-in-a-nutshell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Relph1119%2Felasticsearch-in-a-nutshell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Relph1119","download_url":"https://codeload.github.com/Relph1119/elasticsearch-in-a-nutshell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224970143,"owners_count":17400294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T20:39:46.597Z","updated_at":"2024-11-16T20:39:47.302Z","avatar_url":"https://github.com/Relph1119.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 《一本书讲透Elasticsearch》学习笔记\n\n本人历时2周时间才看完这本书，对这本书的整体感觉如下：\n1. 书中整体介绍了Elasticsearch的各个知识点，包括索引、映射、分词、预处理、文档、脚本、检索、聚合等操作，很适合体系化地学习。\n2. 本书介绍的3个项目，其中第3个项目（Elastic Stack日志系统实战）可以本地化部署，其他两个项目不太详细，无法支持本地化部署学习。\n3. 通过这本书的学习，也总结了在环境安装时遇到的坑，提供8.12.2版本的部署安装步骤，方便大家学习。\n\n原书源代码地址：https://github.com/mingyitianxia/elasticsearch-made-easy\n\n## 笔记地址\n\n在线阅读地址：https://relph1119.github.io/elasticsearch-in-a-nutshell/#/\n\n## 环境安装（基于CentOS7.6）\n\n### 安装Elasticsearch8.12.2\n\n1. 下载`Elasticsearch8.12.2`  \n下载地址：https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.12.2-linux-x86_64.tar.gz\n\n2. 创建`elasticsearch`用户\n```shell\ngroupadd elasticsearch\nuseradd -m -g elasticsearch elasticsearch\n```\n\n3. 在`root`用户下，解压到`/home/elasticsearch`目录下\n\n```shell\ncd /home/elasticsearch\ntar -xvf elasticsearch-8.12.2-linux-x86_64.tar.gz\nchown -R elasticsearch:elasticsearch elasticsearch-8.12.2\nsu elasticsearch\n```\n\n4. 在`elasticsearch`用户下，下载IK分词器\n```shell\ncd /home/elasticsearch\ncd elasticsearch-8.12.2/\n./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v8.12.2/elasticsearch-analysis-ik-8.12.2.zip\n```\n\n5. 在`elasticsearch`用户下启动`Elasticsearch`\n\n```shell\ncd elasticsearch-8.12.2/\n./bin/elasticsearch \u0026\n```\n\n### 安装Kibana8.12.2\n\n1. 下载`Kibana8.12.2`  \n下载地址：https://artifacts.elastic.co/downloads/kibana/kibana-8.12.2-linux-x86_64.tar.gz\n   \n2. 在`/root`目录下解压，启动`Kibana`\n```shell\ntar -xvf kibana-8.12.2-linux-x86_64.tar.gz\ncd kibana-8.12.2\n./bin/kibana --allow-root \u0026\n```\n\n### 安装Metricbeat8.12.2\n\n1. 下载`Metricbeat8.12.2`\n下载地址：https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-8.12.2-linux-x86_64.tar.gz\n   \n2. 在`/root`目录下解压\n```shell\ntar -xvf metricbeat-8.12.2-linux-x86_64.tar.gz\n```\n\n3. 启动`X-Pack`插件\n```shell\n./metricbeat modules enable elasticsearch-xpack\n```\n\n4. 配置`elasticsearch-xpack.yml`\n```yaml\n- module: elasticsearch\n  xpack.enabled: true\n  period: 10s\n  hosts: [\"http://192.168.56.103:9200\"]\n  username: \"elastic\"\n  password: \"\"\n```\n\n5. 配置`metricbeat.yml`\n```yaml\nsetup.kibana:\n\n  # Kibana Host\n  # Scheme and port can be left out and will be set to the default (http and 5601)\n  # In case you specify and additional path, the scheme is required: http://localhost:5601/path\n  # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601\n  host: \"192.168.56.103:5601\"\n  username: \"elastic\"\n  password: \"Dwgtt1vooBMnHGMSP_z3\"\n\noutput.elasticsearch:\n  # Array of hosts to connect to.\n  hosts: [\"192.168.56.103:9200\"]\n\n  # Performance preset - one of \"balanced\", \"throughput\", \"scale\",\n  # \"latency\", or \"custom\".\n  preset: balanced\n\n  # Protocol - either `http` (default) or `https`.\n  protocol: \"https\"\n\n  # Authentication credentials - either API key or username/password.\n  #api_key: \"id:api_key\"\n  username: \"elastic\"\n  password: \"\"\n\n  ssl.verification_mode: none\n```\n\n6. 启动`Metricbeat`\n```shell\nnohup ./metricbeat \u0026 \u003e /dev/null 2\u003e\u00261\n```\n\n### 安装Logstash\n\n1. 下载`Logstash8.12.2`\n下载地址：https://artifacts.elastic.co/downloads/logstash/logstash-8.12.2-linux-x86_64.tar.gz\n   \n2. 在`/root`目录下解压\n```shell\ntar -xvf logstash-8.12.2-linux-x86_64.tar.gz\n```\n\n3. 执行数据处理\n```shell\ncd /root/logstash-8.12.2/\n./bin/logstash -f ./config/logstash-weblog.conf\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelph1119%2Felasticsearch-in-a-nutshell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelph1119%2Felasticsearch-in-a-nutshell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelph1119%2Felasticsearch-in-a-nutshell/lists"}