개발/프로덕션 환경에서 Elasticsearch를 설치 및 구성하는 방법은 무엇입니까?
게시 됨: 2019-12-29 이 자습서에서는 개발 및 프로덕션 환경에 대해 Elasticsearch
를 설치하고 구성하는 방법에 대한 단계를 살펴봅니다.
엘라스틱서치란?
세계 최고의 검색 및 분석 엔진 중 하나입니다. Elasticsearch는 수평 scalability
, 최대 reliability
및 손쉬운 관리를 위해 설계된 분산 JSON 기반 엔진입니다.
Elastic Search는 데이터를 중앙 집중식으로 저장하므로 예상되는 것을 발견하고 예상치 못한 것을 발견할 수 있습니다. Filebeat를 통해 ElasticSearch에서 모든 로그를 보내고 지표를 즉시 시각화할 수 있습니다.
아래 질문 중 하나가 있으면 올바른 위치에 있습니다.
- Ubuntu 16.04에서 Elasticsearch를 설치 및 구성하는 방법
- Elasticsearch 설정 및 구성
- Elasticsearch 설치 및 구성
- 원격 Elasticsearch 인스턴스를 설치 및 구성하는 방법
1단계) Elasticsearch 설치
다음은 Linux/Ubuntu OS에 Elasticsearch를 설치하는 몇 가지 간단한 명령입니다.
1 2 3 4 5 6 7 8 9 |
bash - 3.2 $ wget https : //artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.0.tar.gz bash - 3.2 $ wget https : //artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.0.tar.gz.sha512 bash - 3.2 $ shasum - a 512 - c elasticsearch - 6.7.0.tar.gz.sha512 bash - 3.2 $ tar - xzf elasticsearch - 6.7.0.tar.gz bash - 3.2 $ cd elasticsearch - 6.7.0 / |
그리고 그게 다야. 다음은 설치 로그입니다.
설치 로그:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
crunch@localhost:/$ cd tmp/ crunch@localhost:/tmp$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.0.tar.gz --2019-03-30 14:41:25-- https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.0.tar.gz Resolving artifacts.elastic.co (artifacts.elastic.co)... 2a04:4e42:a::734, 151.101.42.222 Connecting to artifacts.elastic.co (artifacts.elastic.co)|2a04:4e42:a::734|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 149006122 (142M) [application/x-gzip] Saving to: ‘elasticsearch-6.7.0.tar.gz’ elasticsearch-6.7.0.tar.gz 100%[=========================================================================>] 142.10M 215MB/s in 0.7s 2019-03-30 14:41:26 (215 MB/s) - ‘elasticsearch-6.7.0.tar.gz’ saved [149006122/149006122] crunch@localhost:/tmp$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.0.tar.gz.sha512 --2019-03-30 14:41:26-- https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.0.tar.gz.sha512 Resolving artifacts.elastic.co (artifacts.elastic.co)... 2a04:4e42:a::734, 151.101.42.222 Connecting to artifacts.elastic.co (artifacts.elastic.co)|2a04:4e42:a::734|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 156 [application/octet-stream] Saving to: ‘elasticsearch-6.7.0.tar.gz.sha512’ elasticsearch-6.7.0.tar.gz.sha512 100%[=========================================================================>] 156 --.-KB/s in 0s 2019-03-30 14:41:26 (24.2 MB/s) - ‘elasticsearch-6.7.0.tar.gz.sha512’ saved [156/156] crunch@localhost:/tmp$ shasum -a 512 -c elasticsearch-6.7.0.tar.gz.sha512 elasticsearch-6.7.0.tar.gz: OK crunch@localhost:/tmp$ tar -xzf elasticsearch-6.7.0.tar.gz crunch@localhost:/tmp$ cd elasticsearch-6.7.0/ crunch@localhost:/tmp/elasticsearch-6.7.0$ ./bin/elasticsearch warning: Falling back to java on path. This behavior is deprecated. Specify JAVA_HOME OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. OpenJDK 64-Bit Server VM warning: UseAVX=2 is not supported on this CPU, setting it to UseAVX=1 [2019-03-30T14:42:15,073][INFO ][o.e.e.NodeEnvironment ] [ZKsMkES] using [1] data paths, mounts [[/ (/dev/sda)]], net usable_space [69.8gb], net total_space [78.2gb], types [ext4] [2019-03-30T14:42:15,079][INFO ][o.e.e.NodeEnvironment ] [ZKsMkES] heap size [1007.3mb], compressed ordinary object pointers [true] [2019-03-30T14:42:15,084][INFO ][o.e.n.Node ] [ZKsMkES] node name derived from node ID [ZKsMkESwRL27iYEKUaBluQ]; set [node.name] to override [2019-03-30T14:42:15,084][INFO ][o.e.n.Node ] [ZKsMkES] version[6.7.0], pid[20094], build[default/tar/8453f77/2019-03-21T15:32:29.844721Z], OS[Linux/4.18.0-13-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/11.0.1/11.0.1+13-Ubuntu-3ubuntu3.18.10.1] [2019-03-30T14:42:15,084][INFO ][o.e.n.Node ] [ZKsMkES] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch-6051013812527326393, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -XX:UseAVX=2, -Des.path.home=/tmp/elasticsearch-6.7.0, -Des.path.conf=/tmp/elasticsearch-6.7.0/config, -Des.distribution.flavor=default, -Des.distribution.type=tar] [2019-03-30T14:42:17,459][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [aggs-matrix-stats] [2019-03-30T14:42:17,460][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [analysis-common] [2019-03-30T14:42:17,460][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [ingest-common] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [ingest-geoip] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [ingest-user-agent] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [lang-expression] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [lang-mustache] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [lang-painless] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [mapper-extras] [2019-03-30T14:42:17,488][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [parent-join] [2019-03-30T14:42:17,488][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [percolator] [2019-03-30T14:42:17,488][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [rank-eval] [2019-03-30T14:42:17,488][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [reindex] [2019-03-30T14:42:17,488][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [repository-url] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [transport-netty4] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [tribe] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-ccr] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-core] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-deprecation] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-graph] [2019-03-30T14:42:17,490][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-ilm] [2019-03-30T14:42:17,490][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-logstash] [2019-03-30T14:42:17,490][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-ml] [2019-03-30T14:42:17,490][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-monitoring] [2019-03-30T14:42:17,496][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-rollup] [2019-03-30T14:42:17,497][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-security] [2019-03-30T14:42:17,497][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-sql] [2019-03-30T14:42:17,498][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-upgrade] [2019-03-30T14:42:17,499][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-watcher] [2019-03-30T14:42:17,499][INFO ][o.e.p.PluginsService ] [ZKsMkES] no plugins loaded [2019-03-30T14:42:22,899][INFO ][o.e.x.s.a.s.FileRolesStore] [ZKsMkES] parsed [0] roles from file [/tmp/elasticsearch-6.7.0/config/roles.yml] [2019-03-30T14:42:24,035][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [ZKsMkES] [controller/20173] [Main.cc@109] controller (64 bit): Version 6.7.0 (Build d74ae2ac01b10d) Copyright (c) 2019 Elasticsearch BV [2019-03-30T14:42:24,565][DEBUG][o.e.a.ActionModule ] [ZKsMkES] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security [2019-03-30T14:42:24,896][INFO ][o.e.d.DiscoveryModule ] [ZKsMkES] using discovery type [zen] and host providers [settings] [2019-03-30T14:42:25,908][INFO ][o.e.n.Node ] [ZKsMkES] initialized [2019-03-30T14:42:25,908][INFO ][o.e.n.Node ] [ZKsMkES] starting ... [2019-03-30T14:42:26,087][INFO ][o.e.t.TransportService ] [ZKsMkES] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300} [2019-03-30T14:42:26,128][WARN ][o.e.b.BootstrapChecks ] [ZKsMkES] max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] [2019-03-30T14:42:29,217][INFO ][o.e.c.s.MasterService ] [ZKsMkES] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {ZKsMkES}{ZKsMkESwRL27iYEKUaBluQ}{YYShNSkJT7Ctc-LFBTrO8w}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=4136235008, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true} [2019-03-30T14:42:29,226][INFO ][o.e.c.s.ClusterApplierService] [ZKsMkES] new_master {ZKsMkES}{ZKsMkESwRL27iYEKUaBluQ}{YYShNSkJT7Ctc-LFBTrO8w}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=4136235008, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true}, reason: apply cluster state (from master [master {ZKsMkES}{ZKsMkESwRL27iYEKUaBluQ}{YYShNSkJT7Ctc-LFBTrO8w}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=4136235008, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]]) [2019-03-30T14:42:29,315][INFO ][o.e.h.n.Netty4HttpServerTransport] [ZKsMkES] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200} [2019-03-30T14:42:29,316][INFO ][o.e.n.Node ] [ZKsMkES] started [2019-03-30T14:42:29,322][WARN ][o.e.x.s.a.s.m.NativeRoleMappingStore] [ZKsMkES] Failed to clear cache for realms [[]] [2019-03-30T14:42:29,404][INFO ][o.e.g.GatewayService ] [ZKsMkES] recovered [0] indices into cluster_state [2019-03-30T14:42:29,692][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.watches] for index patterns [.watches*] [2019-03-30T14:42:29,730][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.triggered_watches] for index patterns [.triggered_watches*] [2019-03-30T14:42:29,783][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.watch-history-9] for index patterns [.watcher-history-9*] [2019-03-30T14:42:29,818][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.monitoring-logstash] for index patterns [.monitoring-logstash-6-*] [2019-03-30T14:42:29,866][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.monitoring-es] for index patterns [.monitoring-es-6-*] [2019-03-30T14:42:29,892][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.monitoring-alerts] for index patterns [.monitoring-alerts-6] [2019-03-30T14:42:29,957][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.monitoring-beats] for index patterns [.monitoring-beats-6-*] [2019-03-30T14:42:29,991][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.monitoring-kibana] for index patterns [.monitoring-kibana-6-*] [2019-03-30T14:42:30,116][INFO ][o.e.l.LicenseService ] [ZKsMkES] license [319113dd-7fb5-4ae5-8355-e2c7458b1532] mode [basic] - valid |
2단계) Elasticsearch 프로세스 시작
JAVA_HOME이 올바르게 설정되었는지 확인해야 합니다.
1 2 3 |
crunch @ localhost : / usr / lib / jvm / java - 11 - openjdk - amd64 / bin $ export JAVA_HOME =/ usr / lib / jvm / java - 11 - openjdk - amd64 / bin / crunch @ localhost : / usr / lib / jvm / java - 11 - openjdk - amd64 / bin $ echo $ JAVA_HOME / usr / lib / jvm / java - 11 - openjdk - amd64 / bin / |
ElasticSearch 프로세스 명령 시작:
1 |
. / bin / elasticsearch |
normal user
를 사용하여 Elastic Search를 시작해야 하는지 확인하십시오. ElasticSearch는 root user
로 실행하려고 하면 아래 오류가 표시됩니다.
1 |
java . lang . RuntimeException : can not run elasticsearch as root |
루트가 아닌 사용자 및 로그인을 추가하는 방법에 대한 이 자습서를 따르십시오.
다음은 콘솔 결과 출력입니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
crunch@localhost:/tmp/elasticsearch-6.7.0$ ./bin/elasticsearch warning: Falling back to java on path. This behavior is deprecated. Specify JAVA_HOME OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. OpenJDK 64-Bit Server VM warning: UseAVX=2 is not supported on this CPU, setting it to UseAVX=1 [2019-03-30T14:42:15,073][INFO ][o.e.e.NodeEnvironment ] [ZKsMkES] using [1] data paths, mounts [[/ (/dev/sda)]], net usable_space [69.8gb], net total_space [78.2gb], types [ext4] [2019-03-30T14:42:15,079][INFO ][o.e.e.NodeEnvironment ] [ZKsMkES] heap size [1007.3mb], compressed ordinary object pointers [true] [2019-03-30T14:42:15,084][INFO ][o.e.n.Node ] [ZKsMkES] node name derived from node ID [ZKsMkESwRL27iYEKUaBluQ]; set [node.name] to override [2019-03-30T14:42:15,084][INFO ][o.e.n.Node ] [ZKsMkES] version[6.7.0], pid[20094], build[default/tar/8453f77/2019-03-21T15:32:29.844721Z], OS[Linux/4.18.0-13-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/11.0.1/11.0.1+13-Ubuntu-3ubuntu3.18.10.1] [2019-03-30T14:42:15,084][INFO ][o.e.n.Node ] [ZKsMkES] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch-6051013812527326393, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -XX:UseAVX=2, -Des.path.home=/tmp/elasticsearch-6.7.0, -Des.path.conf=/tmp/elasticsearch-6.7.0/config, -Des.distribution.flavor=default, -Des.distribution.type=tar] [2019-03-30T14:42:17,459][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [aggs-matrix-stats] [2019-03-30T14:42:17,460][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [analysis-common] [2019-03-30T14:42:17,460][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [ingest-common] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [ingest-geoip] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [ingest-user-agent] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [lang-expression] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [lang-mustache] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [lang-painless] [2019-03-30T14:42:17,487][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [mapper-extras] [2019-03-30T14:42:17,488][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [parent-join] [2019-03-30T14:42:17,488][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [percolator] [2019-03-30T14:42:17,488][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [rank-eval] [2019-03-30T14:42:17,488][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [reindex] [2019-03-30T14:42:17,488][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [repository-url] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [transport-netty4] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [tribe] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-ccr] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-core] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-deprecation] [2019-03-30T14:42:17,489][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-graph] [2019-03-30T14:42:17,490][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-ilm] [2019-03-30T14:42:17,490][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-logstash] [2019-03-30T14:42:17,490][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-ml] [2019-03-30T14:42:17,490][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-monitoring] [2019-03-30T14:42:17,496][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-rollup] [2019-03-30T14:42:17,497][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-security] [2019-03-30T14:42:17,497][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-sql] [2019-03-30T14:42:17,498][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-upgrade] [2019-03-30T14:42:17,499][INFO ][o.e.p.PluginsService ] [ZKsMkES] loaded module [x-pack-watcher] [2019-03-30T14:42:17,499][INFO ][o.e.p.PluginsService ] [ZKsMkES] no plugins loaded [2019-03-30T14:42:22,899][INFO ][o.e.x.s.a.s.FileRolesStore] [ZKsMkES] parsed [0] roles from file [/tmp/elasticsearch-6.7.0/config/roles.yml] [2019-03-30T14:42:24,035][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [ZKsMkES] [controller/20173] [Main.cc@109] controller (64 bit): Version 6.7.0 (Build d74ae2ac01b10d) Copyright (c) 2019 Elasticsearch BV [2019-03-30T14:42:24,565][DEBUG][o.e.a.ActionModule ] [ZKsMkES] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security [2019-03-30T14:42:24,896][INFO ][o.e.d.DiscoveryModule ] [ZKsMkES] using discovery type [zen] and host providers [settings] [2019-03-30T14:42:25,908][INFO ][o.e.n.Node ] [ZKsMkES] initialized [2019-03-30T14:42:25,908][INFO ][o.e.n.Node ] [ZKsMkES] starting ... [2019-03-30T14:42:26,087][INFO ][o.e.t.TransportService ] [ZKsMkES] publish_address {127.0.0.1:9300}, bound_addresses {[::1]:9300}, {127.0.0.1:9300} [2019-03-30T14:42:26,128][WARN ][o.e.b.BootstrapChecks ] [ZKsMkES] max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] [2019-03-30T14:42:29,217][INFO ][o.e.c.s.MasterService ] [ZKsMkES] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {ZKsMkES}{ZKsMkESwRL27iYEKUaBluQ}{YYShNSkJT7Ctc-LFBTrO8w}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=4136235008, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true} [2019-03-30T14:42:29,226][INFO ][o.e.c.s.ClusterApplierService] [ZKsMkES] new_master {ZKsMkES}{ZKsMkESwRL27iYEKUaBluQ}{YYShNSkJT7Ctc-LFBTrO8w}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=4136235008, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true}, reason: apply cluster state (from master [master {ZKsMkES}{ZKsMkESwRL27iYEKUaBluQ}{YYShNSkJT7Ctc-LFBTrO8w}{127.0.0.1}{127.0.0.1:9300}{ml.machine_memory=4136235008, xpack.installed=true, ml.max_open_jobs=20, ml.enabled=true} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]]) [2019-03-30T14:42:29,315][INFO ][o.e.h.n.Netty4HttpServerTransport] [ZKsMkES] publish_address {127.0.0.1:9200}, bound_addresses {[::1]:9200}, {127.0.0.1:9200} [2019-03-30T14:42:29,316][INFO ][o.e.n.Node ] [ZKsMkES] started [2019-03-30T14:42:29,322][WARN ][o.e.x.s.a.s.m.NativeRoleMappingStore] [ZKsMkES] Failed to clear cache for realms [[]] [2019-03-30T14:42:29,404][INFO ][o.e.g.GatewayService ] [ZKsMkES] recovered [0] indices into cluster_state [2019-03-30T14:42:29,692][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.watches] for index patterns [.watches*] [2019-03-30T14:42:29,730][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.triggered_watches] for index patterns [.triggered_watches*] [2019-03-30T14:42:29,783][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.watch-history-9] for index patterns [.watcher-history-9*] [2019-03-30T14:42:29,818][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.monitoring-logstash] for index patterns [.monitoring-logstash-6-*] [2019-03-30T14:42:29,866][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.monitoring-es] for index patterns [.monitoring-es-6-*] [2019-03-30T14:42:29,892][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.monitoring-alerts] for index patterns [.monitoring-alerts-6] [2019-03-30T14:42:29,957][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.monitoring-beats] for index patterns [.monitoring-beats-6-*] [2019-03-30T14:42:29,991][INFO ][o.e.c.m.MetaDataIndexTemplateService] [ZKsMkES] adding template [.monitoring-kibana] for index patterns [.monitoring-kibana-6-*] [2019-03-30T14:42:30,116][INFO ][o.e.l.LicenseService ] [ZKsMkES] license [319113dd-7fb5-4ae5-8355-e2c7458b1532] mode [basic] - valid |

Step-3) Elasticsearch 프로세스 프로세스 확인
Elasticsearch가 실행 중인지 확인하는 방법은 무엇입니까?
command:
ps -few | 그렙 탄성
1 2 3 4 |
crunch @ localhost : / tmp / elasticsearch - 6.7.0 $ ps - few | grep elastic crunch 20305 1 99 14 : 46 pts / 0 00 : 00 : 28 / usr / bin / java - Xms1g - Xmx1g - XX : + UseConcMarkSweepGC - XX : CMSInitiatingOccupancyFraction = 75 - XX : + UseCMSInitiatingOccupancyOnly - Des . networkaddress . cache . ttl = 60 - Des . networkaddress . cache . negative . ttl = 10 - XX : + AlwaysPreTouch - Xss1m - Djava . awt . headless = true - Dfile . encoding = UTF - 8 - Djna . nosys = true - XX : - OmitStackTraceInFastThrow - Dio . netty . noUnsafe = true - Dio . netty . noKeySetOptimization = true - Dio . netty . recycler . maxCapacityPerThread = 0 - Dlog4j . shutdownHookEnabled = false - Dlog4j2 . disable . jmx = true - Djava . io . tmpdir =/ tmp / elasticsearch - 5628366226360196103 - XX : + HeapDumpOnOutOfMemoryError - XX : HeapDumpPath = data - XX : ErrorFile = logs / hs_err_pid % p . log - Xlog : gc* , gc + age = trace , safepoint : file = logs / gc . log : utctime , pid , tags : filecount = 32 , filesize = 64m - Djava . locale . providers = COMPAT - XX : UseAVX = 2 - Des . path . home =/ tmp / elasticsearch - 6.7.0 - Des . path . conf =/ tmp / elasticsearch - 6.7.0 / config - Des . distribution . flavor = default - Des . distribution . type = tar - cp / tmp / elasticsearch - 6.7.0 / lib /* org . elasticsearch . bootstrap . Elasticsearch - d crunch 20320 20305 0 14 : 46 pts / 0 00 : 00 : 00 / tmp / elasticsearch - 6.7.0 / modules / x - pack - ml / platform / linux - x86_64 / bin / controller crunch 20362 20062 0 14 : 46 pts / 0 00 : 00 : 00 grep -- color = auto elastic |
그게 다야 ElasticSearch를 실행할 준비가 완료되었습니다.
기본 Elasticsearch 시작 파일:
1 2 3 4 |
crunch @ localhost : / tmp / elasticsearch - 6.7.0 / bin $ pwd / tmp / elasticsearch - 6.7.0 / bin crunch @ localhost : / tmp / elasticsearch - 6.7.0 / bin $ vi elasticsearch |
엘라스틱서치 파일 내용:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
source "`dirname " $ 0 "`" / elasticsearch - env ES_JVM_OPTIONS = "$ES_PATH_CONF" / jvm . options JVM_OPTIONS = ` "$JAVA" - cp "$ES_CLASSPATH" org . elasticsearch . tools . launchers . JvmOptionsParser "$ES_JVM_OPTIONS" ` ES_JAVA_OPTS = "${JVM_OPTIONS//\$\{ES_TMPDIR\}/$ES_TMPDIR} $ES_JAVA_OPTS" cd "$ES_HOME" # manual parsing to find out, if process should be detached if ! echo $ * | grep - E '(^-d |-d$| -d |--daemonize$|--daemonize )' > / dev / null ; then exec \ "$JAVA" \ $ ES_JAVA_OPTS \ - Des . path . home = "$ES_HOME" \ - Des . path . conf = "$ES_PATH_CONF" \ - Des . distribution . flavor = "$ES_DISTRIBUTION_FLAVOR" \ - Des . distribution . type = "$ES_DISTRIBUTION_TYPE" \ - cp "$ES_CLASSPATH" \ org . elasticsearch . bootstrap . Elasticsearch \ "$@" else exec \ "$JAVA" \ $ ES_JAVA_OPTS \ - Des . path . home = "$ES_HOME" \ - Des . path . conf = "$ES_PATH_CONF" \ - Des . distribution . flavor = "$ES_DISTRIBUTION_FLAVOR" \ - Des . distribution . type = "$ES_DISTRIBUTION_TYPE" \ - cp "$ES_CLASSPATH" \ org . elasticsearch . bootstrap . Elasticsearch \ "$@" \ < &- & retval=$? pid=$! [ $retval -eq 0 ] || exit $retval if [ ! -z "$ES_STARTUP_SLEEP_TIME" ]; then sleep $ ES_STARTUP_SLEEP_TIME fi if ! ps - p $ pid > / dev / null ; then exit 1 fi exit 0 fi exit $ ? |
무엇 향후 계획? 파일비트를 설정합니다.
Filebeat를 어떻게 설치하고 구성하나요? 개발/생산 환경을 위한 경량 로그 포워더