{"id":40470,"date":"2024-01-21T21:10:58","date_gmt":"2023-01-15T14:04:01","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/"},"modified":"2024-05-04T19:32:53","modified_gmt":"2024-05-04T11:32:53","slug":"elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/","title":{"rendered":"Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(2): \u5f15\u5165Elasticsearch 8.x"},"content":{"rendered":"<h5>[\u4e0a\u6b21] Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(1): \u5728Hyper-V\u4e0a\u6784\u5efa3\u53f0AlmaLinux\u670d\u52a1\u5668<\/h5>\n<h2>\u9996\u5148<\/h2>\n<p>\u6211\u5011\u5c07\u4f7f\u7528\u76f8\u540c\u7684\u6b65\u9a5f\uff0c\u5728\u4e4b\u524d\u6e96\u5099\u597d\u7684\u4e09\u53f0AlmaLinux\u4f3a\u670d\u5668\u4e0a\u5b89\u88ddElasticsearch 8.x\u3002<\/p>\n<p>AlmaLinux8-1(node1)<\/p>\n<p>AlmaLinux8-2(node2)<\/p>\n<p>AlmaLinux8-3(node3)<\/p>\n<h2>\u5728AlmaLinux8-1\u7684\u865a\u62df\u673a(node1)\u4e0a\u5b89\u88c5Elasticsearch\u8f6f\u4ef6\u5305\u3002<\/h2>\n<p>\u6253\u5f00\u7ec8\u7aef\uff0c\u5e76\u4ee5\u7ba1\u7406\u5458\u6743\u9650\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u3002<\/p>\n<ul class=\"post-ul\">Eslasticsearch\u30ea\u30dd\u30b8\u30c8\u30ea\u306eGPG key\u3092\u30a4\u30f3\u30dd\u30fc\u30c8<\/ul>\n<pre class=\"post-pre\"><code><span class=\"c\"># rpm --import https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch<\/span>\r\n<\/code><\/pre>\n<ul class=\"post-ul\">rpm repository\u3092\u767b\u9332<\/ul>\n<pre class=\"post-pre\"><code>[elasticsearch]\r\nname=Elasticsearch repository for 8.x packages\r\nbaseurl=https:\/\/artifacts.elastic.co\/packages\/8.x\/yum\r\ngpgcheck=1\r\ngpgkey=https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch\r\nenabled=0\r\nautorefresh=1\r\ntype=rpm-md\r\n<\/code><\/pre>\n<ul class=\"post-ul\">Elasticsearch\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/ul>\n<pre class=\"post-pre\"><code><span class=\"c\"># dnf check-update --enablerepo=elasticsearch<\/span>\r\n<span class=\"c\"># dnf install elasticsearch --enablerepo=elasticsearch -y<\/span>\r\n<\/code><\/pre>\n<h2>Elasticsearch\u7684\u914d\u7f6e<\/h2>\n<ul class=\"post-ul\">Elasticsearch\u3092\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u6709\u52b9\u5316<\/ul>\n<pre class=\"post-pre\"><code># systemctl enable elasticsearch\r\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/elasticsearch.service \u2192 \/usr\/lib\/systemd\/system\/elasticsearch.service.\r\n<\/code><\/pre>\n<ul class=\"post-ul\">Elasticsearch\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u3001index\u81ea\u52d5\u4f5c\u6210\u8a2d\u5b9a\u3092\u6700\u7d42\u884c\u306b\u8ffd\u52a0<\/ul>\n<pre class=\"post-pre\"><code><span class=\"na\">action.auto_create_index<\/span><span class=\"pi\">:<\/span> <span class=\"s\">.monitoring*,.watches,.triggered_watches,.watcher-history*,.ml*<\/span>\r\n<\/code><\/pre>\n<h2>\u91cd\u7f6eElasticsearch\u7528\u6237\u5bc6\u7801<\/h2>\n<ul class=\"post-ul\">Elasticsearch\u3092\u8d77\u52d5<\/ul>\n<pre class=\"post-pre\"><code># systemctl start elasticsearch\r\n<\/code><\/pre>\n<ul class=\"post-ul\">elastic\u30e6\u30fc\u30b6\u30fc\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30ea\u30bb\u30c3\u30c8<\/ul>\n<pre class=\"post-pre\"><code># \/usr\/share\/elasticsearch\/bin\/elasticsearch-reset-password -u elastic -i\r\nThis tool will reset the password of the [elastic] user.\r\nYou will be prompted to enter the password.\r\nPlease confirm that you would like to continue [y\/N]y\r\nEnter password for [elastic]:\r\nRe-enter password for [elastic]:\r\nPassword for the [elastic] user successfully reset.\r\n<\/code><\/pre>\n<h2>\u786e\u8ba4Elasticsearch\u662f\u5426\u5df2\u542f\u52a8<\/h2>\n<pre class=\"post-pre\"><code># curl -k -u elastic https:\/\/localhost:9200\r\nEnter host password for user 'elastic':\r\n{\r\n  \"name\" : \"node1\",\r\n  \"cluster_name\" : \"elasticsearch\",\r\n  \"cluster_uuid\" : \"ksn5SqyVRQK4I1RWKKp95w\",\r\n  \"version\" : {\r\n    \"number\" : \"8.3.3\",\r\n    \"build_flavor\" : \"default\",\r\n    \"build_type\" : \"rpm\",\r\n    \"build_hash\" : \"801fed82df74dbe537f89b71b098ccaff88d2c56\",\r\n    \"build_date\" : \"2022-07-23T19:30:09.227964828Z\",\r\n    \"build_snapshot\" : false,\r\n    \"lucene_version\" : \"9.2.0\",\r\n    \"minimum_wire_compatibility_version\" : \"7.17.0\",\r\n    \"minimum_index_compatibility_version\" : \"7.0.0\"\r\n  },\r\n  \"tagline\" : \"You Know, for Search\"\r\n}\r\n<\/code><\/pre>\n<h2>\u5728\u865a\u62df\u673aAlmaLinux8-2\uff08\u8282\u70b92\uff09\u4e0a\u5b89\u88c5Elasticsearch\u3002<\/h2>\n<p>\u6b65\u9aa4\u4e0e\u4e0a\u8ff0\u76f8\u540c\u3002<\/p>\n<h2>\u5728\u963f\u5c14\u9a6cLinux8-3\u8282\u70b93\u7684\u865a\u62df\u673a\u4e0a\u5b89\u88c5Elasticsearch\u3002<\/h2>\n<p>\u6b65\u9aa4\u4e0e\u4e0a\u8ff0\u76f8\u540c\u3002<\/p>\n<h2>\u7ed3\u675f\u65f6<\/h2>\n<p>\u6211\u5728\u4e09\u53f0\u670d\u52a1\u5668\u4e0a\u5206\u522b\u5b89\u88c5\u4e86Elasticsearch\u3002<br \/>\n\u4e0b\u6b21\u4f1a\u8fdb\u884c\u96c6\u7fa4\u8bbe\u7f6e\u3002\u656c\u8bf7\u671f\u5f85\u3002<\/p>\n<h5>\u4e0b\u4e00\u6b21\uff0cElasticsearch\u96c6\u7fa4\u9a8c\u8bc1(3): Elasticsearch 8.x\u7684\u96c6\u7fa4\u5316(\u4e0d\u652f\u6301HTTPS)\u3002<\/h5>\n","protected":false},"excerpt":{"rendered":"<p>[\u4e0a\u6b21] Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(1): \u5728Hyper-V\u4e0a\u6784\u5efa3\u53f0AlmaLinux\u670d\u52a1\u5668 \u9996\u5148 [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-40470","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(2): \u5f15\u5165Elasticsearch 8.x - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch\u96c6\u7fa4\u9a8c\u8bc12-\u5f15\u5165elasticsearch-8-x\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(2): \u5f15\u5165Elasticsearch 8.x\" \/>\n<meta property=\"og:description\" content=\"[\u4e0a\u6b21] Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(1): \u5728Hyper-V\u4e0a\u6784\u5efa3\u53f0AlmaLinux\u670d\u52a1\u5668 \u9996\u5148 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch\u96c6\u7fa4\u9a8c\u8bc12-\u5f15\u5165elasticsearch-8-x\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-15T14:04:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-04T11:32:53+00:00\" \/>\n<meta name=\"author\" content=\"\u5b87, \u534e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5b87, \u534e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/\",\"name\":\"Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(2): \u5f15\u5165Elasticsearch 8.x - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-01-15T14:04:01+00:00\",\"dateModified\":\"2024-05-04T11:32:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(2): \u5f15\u5165Elasticsearch 8.x\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458\",\"name\":\"\u5b87, \u534e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g\",\"caption\":\"\u5b87, \u534e\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(2): \u5f15\u5165Elasticsearch 8.x - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch\u96c6\u7fa4\u9a8c\u8bc12-\u5f15\u5165elasticsearch-8-x\/","og_locale":"zh_CN","og_type":"article","og_title":"Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(2): \u5f15\u5165Elasticsearch 8.x","og_description":"[\u4e0a\u6b21] Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(1): \u5728Hyper-V\u4e0a\u6784\u5efa3\u53f0AlmaLinux\u670d\u52a1\u5668 \u9996\u5148 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch\u96c6\u7fa4\u9a8c\u8bc12-\u5f15\u5165elasticsearch-8-x\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-01-15T14:04:01+00:00","article_modified_time":"2024-05-04T11:32:53+00:00","author":"\u5b87, \u534e","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u5b87, \u534e","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/","name":"Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(2): \u5f15\u5165Elasticsearch 8.x - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-01-15T14:04:01+00:00","dateModified":"2024-05-04T11:32:53+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Elasticsearch\u96c6\u7fa4\u9a8c\u8bc1(2): \u5f15\u5165Elasticsearch 8.x"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/513018e4e121d3add1b7c5de8be21458","name":"\u5b87, \u534e","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63cd45cbc05a35fc4ff7637a163c83c4962ef58d27472726c3a3e0c9c5194f0f?s=96&d=mm&r=g","caption":"\u5b87, \u534e"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yuhua\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/elasticsearch%e9%9b%86%e7%be%a4%e9%aa%8c%e8%af%812-%e5%bc%95%e5%85%a5elasticsearch-8-x\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=40470"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40470\/revisions"}],"predecessor-version":[{"id":100244,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/40470\/revisions\/100244"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=40470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=40470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=40470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}