{"id":1095,"date":"2020-12-13T15:54:34","date_gmt":"2020-12-13T06:54:34","guid":{"rendered":"http:\/\/leenux.kr\/?p=1095"},"modified":"2021-01-14T19:22:01","modified_gmt":"2021-01-14T10:22:01","slug":"elasticsearch-%ec%84%a4%ec%b9%98-%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/leenux.kr\/?p=1095","title":{"rendered":"[CentOS8] Elasticsearch \uc124\uce58"},"content":{"rendered":"\n<p class=\"has-text-color has-large-font-size has-very-dark-gray-color\"><strong>Elasticsearch\ub780??<\/strong><\/p>\n\n\n\n<p class=\"has-text-color has-medium-font-size has-very-dark-gray-color\"><strong>Elasticsearch\ub294 HTTP \uc6f9 \uc778\ud130\ud398\uc774\uc2a4\uc640 \uc2a4\ud0a4\ub9c8\uc5d0\uc11c \uc790\uc720\ub85c\uc6b4 JSON \ubb38\uc11c\uc640 \ud568\uaed8 \ubd84\uc0b0 \uba40\ud2f0\ud14c\ub10c\ud2b8 \uc9c0\uc6d0 \uc804\ubb38\uc778 \ub8e8\uc52c \uae30\ubc18 \uac80\uc0c9 \uc5d4\uc9c4\uc774\ub2e4.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p style=\"text-align:center\" class=\"has-text-color has-large-font-size has-very-dark-gray-color\"><strong>\uc124\uce58<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/7.10\/rpm.html#rpm-repo\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/7.10\/rpm.html#rpm-repo<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/yum.repo.d\/ \n\nvi elasticsearch.repo  # elasticsearch \uc124\uce58 \ud30c\uc77c<\/code><\/pre>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>elasticsearch \uc124\uce58 \ud30c\uc77c\uc744 \uc0dd\uc131 \ud6c4 \uc124\uce58 \ub0b4\uc6a9 \uc0bd\uc785<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[elasticsearch]\nname=Elasticsearch repository for 7.x packages\nbaseurl=https:\/\/artifacts.elastic.co\/packages\/7.x\/yum\ngpgcheck=1\ngpgkey=https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch\nenabled=0\nautorefresh=1\ntype=rpm-md<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install --enablerepo=elasticsearch elasticsearch<\/code><\/pre>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>\uc0dd\uc131 \uacbd\ub85c \ud655\uc778 ( \uc124\uce58 \uc815\uc0c1 \ud655\uc778 )<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/share\/elasticsearch \/etc\/elasticsearch \/etc\/init.d\/elasticsearch<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>elasticsearch \uc124\uc815 \ud30c\uc77c \ub0b4\uc6a9 \uc218\uc815<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/elasticsearch\/elasticsearch.yml<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>network.host : 0.0.0.0\ncluster.initial_master_nodes: elasticsearch.local # \uc8fc\uc11d \ud574\uccb4\ud6c4 \ubcc0\uacbd<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>elasticsearch \uc11c\ube44\uc2a4 \uc2dc\uc791<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start elasticsearch.service<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>elasticsearch \ud3ec\ud2b8 \ud655\uc778<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>netstat -ant | grep 9200<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" src=\"http:\/\/leenux.kro.kr\/wp-content\/uploads\/2020\/12\/image-1.png\" alt=\"\" class=\"wp-image-1097\" width=\"766\" height=\"331\" srcset=\"https:\/\/leenux.kr\/wp-content\/uploads\/2020\/12\/image-1.png 534w, https:\/\/leenux.kr\/wp-content\/uploads\/2020\/12\/image-1-300x130.png 300w, https:\/\/leenux.kr\/wp-content\/uploads\/2020\/12\/image-1-230x99.png 230w, https:\/\/leenux.kr\/wp-content\/uploads\/2020\/12\/image-1-350x151.png 350w, https:\/\/leenux.kr\/wp-content\/uploads\/2020\/12\/image-1-480x208.png 480w\" sizes=\"(max-width: 766px) 100vw, 766px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>Elasticsearch \ud3ec\ud2b8 \ubc29\ud654\ubcbd \ud574\uccb4<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --permanent --zone=public --add-port=9200\/tcp<\/code><\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-red-color\">\ub9cc\uc57d firewall \ub2e4\uc6b4\uc774 \uc548\ubc1b\uc544\uc838\uc788\uc744 \uacbd\uc6b0 <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get install firewalld<\/code><\/pre>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><strong>\uc6f9 \uc0ac\uc774\ud2b8 \uc811\uc18d elasticsearch \uc11c\ube44\uc2a4 \uc0c1\ud0dc \ud655\uc778 <\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:\/\/localhost:9200\/<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" src=\"http:\/\/leenux.kro.kr\/wp-content\/uploads\/2020\/12\/image-2.png\" alt=\"\" class=\"wp-image-1098\" width=\"475\" height=\"455\" srcset=\"https:\/\/leenux.kr\/wp-content\/uploads\/2020\/12\/image-2.png 473w, https:\/\/leenux.kr\/wp-content\/uploads\/2020\/12\/image-2-300x287.png 300w, https:\/\/leenux.kr\/wp-content\/uploads\/2020\/12\/image-2-230x220.png 230w, https:\/\/leenux.kr\/wp-content\/uploads\/2020\/12\/image-2-350x335.png 350w\" sizes=\"(max-width: 475px) 100vw, 475px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Elasticsearch\ub780?? Elasticsearch\ub294 HTTP \uc6f9 \uc778\ud130\ud398\uc774\uc2a4\uc640 \uc2a4\ud0a4\ub9c8\uc5d0\uc11c \uc790\uc720\ub85c\uc6b4 JSON \ubb38\uc11c\uc640 \ud568\uaed8 \ubd84\uc0b0 \uba40\ud2f0\ud14c\ub10c\ud2b8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1094,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[32,29],"tags":[],"_links":{"self":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts\/1095"}],"collection":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1095"}],"version-history":[{"count":8,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts\/1095\/revisions"}],"predecessor-version":[{"id":1236,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/posts\/1095\/revisions\/1236"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=\/wp\/v2\/media\/1094"}],"wp:attachment":[{"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/leenux.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}