{"id":1313,"date":"2021-07-30T15:06:35","date_gmt":"2021-07-30T07:06:35","guid":{"rendered":"https:\/\/egonlin.com\/?p=1313"},"modified":"2022-03-28T11:27:34","modified_gmt":"2022-03-28T03:27:34","slug":"elk%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/egonlin.com\/?p=1313","title":{"rendered":"ELK\u5b89\u88c5"},"content":{"rendered":"<h1>ELK\u7b80\u5355\u5b89\u88c5<\/h1>\n<h2>\u4e00\u3001\u96c6\u7fa4\u89c4\u5212<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u4e3b\u673a\u540d<\/th>\n<th>\u5916\u7f51IP<\/th>\n<th>\u5185\u7f51IP<\/th>\n<th>\u914d\u7f6e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>es-01<\/td>\n<td>192.168.15.131<\/td>\n<td>172.16.1.132<\/td>\n<td>2\u68384G<\/td>\n<\/tr>\n<tr>\n<td>es-02<\/td>\n<td>192.168.15.131<\/td>\n<td>172.16.1.132<\/td>\n<td>2\u68384G<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u4e8c\u3001\u96c6\u7fa4\u4f18\u5316<\/h2>\n<h3>1\u3001\u5173\u95ed\u9632\u706b\u5899<\/h3>\n<pre><code class=\"language-bash\">systemctl disable --now firewalld<\/code><\/pre>\n<h3>2\u3001\u5173\u95edselinux<\/h3>\n<pre><code class=\"language-bash\"># \u6c38\u4e45\u5173\u95ed\nsed -i &#039;s#enforcing#disabled#g&#039; \/etc\/selinux\/config\n\n#\u4e34\u65f6\u5173\u95ed\nsetenforce 0<\/code><\/pre>\n<h3>3\u3001\u914d\u7f6e\u672c\u5730\u57df\u540d\u89e3\u6790<\/h3>\n<pre><code class=\"language-bash\">[root@es-01 ~]# vim \/etc\/hosts\n...\n192.168.15.131  es-01\n192.168.15.132  es-02<\/code><\/pre>\n<h3>4\u3001\u5185\u6838\u4f18\u5316<\/h3>\n<blockquote>\n<p>\u200b  \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cElasticsearch\u4f7f\u7528mmapfs\u76ee\u5f55\u5b58\u50a8\u5176\u7d22\u5f15\uff0cmmap\u8ba1\u6570\u7684\u9ed8\u8ba4\u64cd\u4f5c\u7cfb\u7edf\u9650\u5236\u53ef\u80fd\u592a\u4f4e\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5185\u5b58\u4e0d\u8db3\uff0c\u9700\u8981\u5c06\u5176\u8c03\u81f3262144\u3002\u7f16\u8f91sysctl.conf \u6587\u4ef6\uff1a<\/p>\n<\/blockquote>\n<pre><code class=\"language-bash\">[root@es-01 ~]# vim \/etc\/sysctl.conf\nvm.max_map_count = 262144\n\n##\u91cd\u8f7d\u751f\u6548\nsysctl -p<\/code><\/pre>\n<h3>5\u3001\u8fdb\u7a0b\u9650\u5236\u4f18\u5316<\/h3>\n<pre><code class=\"language-bash\">vim \/etc\/security\/limits.conf\n\n# \u5c3e\u90e8\u8ffd\u52a0\u5982\u4e0b\u5185\u5bb9\nroot soft nofile 65536\nroot hard nofile 65536\n* soft nofile 65536\n* hard nofile 65536\n* soft memlock  unlimited\n* hard memlock  unlimited<\/code><\/pre>\n<h3>6\u3001\u5b89\u88c5jdk<\/h3>\n<pre><code class=\"language-bash\">yum install java-1.8.0* -y\n\n# \u786e\u5b9ajdk\u5b89\u88c5\u6210\u529f\njava -version<\/code><\/pre>\n<h2>\u4e09\u3001Elasticsearch\u90e8\u7f72<\/h2>\n<h3>1\u3001\u4e0b\u8f7d\u5730\u5740<\/h3>\n<p><\/p><div id=\"rml_readmorelogin_placeholder\" style=\"position:relative;\"><div id=\"rml_fade_content\" style=\"position: absolute;\r\ntop:-10em;\r\nwidth:100%;\r\nheight:10em;\r\nbackground: -webkit-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -moz-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -o-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\r\nbackground-image: -ms-linear-gradient(rgba(255, 255, 255, 0) 0%,#ffffff 100%);\"><\/div><div class=\"wpf-controller aru_rml_from_in_post\" style=\"background-color:#eeeeee;border:5px solid #cce6ff;\" id=\"ARU_ReadMoreLogin_ReadMoreLoginController\"><h2 id=\"Header\">\u67e5\u770b\u66f4\u591a<\/h2><div id=\"Message\"><p>\u8054\u7cfb\u7ba1\u7406\u5458\u5fae\u4fe1tutu19192010\uff0c\u6ce8\u518c\u8d26\u53f7<\/p>\n<\/div><div id=\"StatusBarHeader\"><\/div><form id=\"ARU_ReadMoreLogin_ReadMoreLoginController\"><input name=\"post_id\" value=\"1313\" type=\"hidden\"\/><input name=\"_init_callback\" value=\"InitLogin\" type=\"hidden\"\/><input name=\"post_id\" value=\"1313\" type=\"hidden\"\/><input name=\"rt_ype\" value=\"1\" type=\"hidden\"\/><input name=\"nonce\" value=\"1f5abf6419\" type=\"hidden\"\/><input name=\"_wpnonce\" value=\"d289e6f2e3\" type=\"hidden\"\/><input name=\"_controller\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginController\" type=\"hidden\"\/><input name=\"_proxy_controller\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginController\" type=\"hidden\"\/><input name=\"_view\" value=\"ARU_ReadMoreLogin\\ReadMoreLoginView\" type=\"hidden\"\/><table class=\"wpf-table-placeholder\"><tbody class=\"wpf-table-placeholder\"><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\" width=\"400px\"><table class=\"wpf-table-placeholder\"><tbody class=\"wpf-table-placeholder\"><tr class=\"wpf-table-placeholder\"><th class=\"wpf-table-placeholder-input\"><label class=\"wpf-label\">Username:<\/label><\/th><\/tr><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\"><input class=\"regular-text text_input\" name=\"username\" value=\"\" type=\"text\"\/><\/td><\/tr><tr class=\"wpf-table-placeholder\"><th class=\"wpf-table-placeholder-input\"><label class=\"wpf-label\">Password:<\/label><\/th><\/tr><tr class=\"wpf-table-placeholder\"><td class=\"wpf-table-placeholder-input\"><input class=\"regular-text text_input\" name=\"password\" value=\"\" type=\"password\"\/><\/td><\/tr><\/tbody><\/table><p class=\"wpf-table-placeholder submit\"><button class=\"wp_plugin_framework_ajax_button\" type=\"button\" style=\"background-color:#4D90FE;;color:#ffffff;;border:1px solid #3079ed;\" name=\"_event\" value=\"ButtonLogin\">Log in<\/button><\/p><\/td><td class=\"wpf-table-placeholder-input\"><\/td><\/tr><\/tbody><\/table><\/form><div id=\"ButtonStartRegister\"><a href=\"https:\/\/egonlin.com\/wp-login.php?action=register\">Register<\/a><\/div><div id=\"Link1\"><a href=\"https:\/\/egonlin.com\/wp-login.php?action=lostpassword\">Forgotten username or password?<\/a><\/div><div id=\"StatusBarFooter\"><\/div><\/div><\/div><div id=aru_remaining_content><\/div>","protected":false},"excerpt":{"rendered":"<p>ELK\u7b80\u5355\u5b89\u88c5 \u4e00\u3001\u96c6\u7fa4\u89c4\u5212 \u4e3b\u673a\u540d \u5916\u7f51IP \u5185\u7f51IP \u914d\u7f6e es-01 192.168.15.131 17 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1314,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[163],"tags":[21,165,19,22,166,20],"_links":{"self":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1313"}],"collection":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1313"}],"version-history":[{"count":0,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/1313\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/media\/1314"}],"wp:attachment":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}