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 | # java 설치 sudo apt-get update sudo apt install openjdk-11-jdk # 설치 wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg sudo apt-get install apt-transport-https echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list sudo apt-get update && sudo apt-get install elasticsearch # 메모리 수정 sudo vi /etc/elasticsearch/jvm.options -Xms256m -Xmx256m # 설정 수정 vi /etc/elasticsearch/elasticsearch.yml node.name: node-1 network.host: 0.0.0.0 http.port: 9200 discovery.seed_hosts: ["127.0.0.1"] cluster.initial_master_nodes: ["node-1"] # 서비스 등록 및 시작 sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service sudo systemctl start elasticsearch.service curl -X GET "localhost:9200" # 상태 확인 curl localhost:9200/_cat/indices?v curl -X GET localhost:9200/_cat/health?v curl -X GET localhost:9200/_cat/nodes?v | cs |
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 설치 sudo apt-get update && sudo apt-get install kibana # 설정 변경 vi /etc/kibana/kibana.yml server.port: 5601 server.host: "0.0.0.0" elasticsearch.hosts: ["http://[es_ip]:9200"] # 서비스 등록 및 시작 sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable kibana.service sudo systemctl start kibana.service | cs |
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 | # 설치 wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list sudo apt-get update && sudo apt-get install logstash # 설정 vi /etc/logstash/conf.d/logstash.conf input { beats { port => 5044 host => "0.0.0.0" } } filter { } output { elasticsearch { hosts => ["http://localhost:9200"] index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}" #user => "elastic" #password => "changeme" } } # 서비스 등록 및 시작 sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable logstash.service sudo systemctl start logstash.service # 상태 확인 tail -f /var/log/logstash/logstash-plain.log | cs |
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 | # 설치 curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.17.8-amd64.deb sudo dpkg -i filebeat-7.17.8-amd64.deb # 설정 변경 vi /etc/filebeat/filebeat.yml - type: log id: test_log enabled: true paths: - /var/log/*.log filebeat.config.modules: path: ${path.config}/modules.d/*.yml reload.enabled: true setup.dashboards.enabled: true setup.kibana: host: "[kibana_ip]:5601" output.logstash: hosts: ["es_ip:5044"] # 모듈 설정 filebeat modules list filebeat modules enable [모듈] # 서비스 등록 및 시작 sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable filebeat.service sudo systemctl start filebeat.service | cs |
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 | # 서비스 중지 sudo systemctl stop elasticsearch.service sudo systemctl stop kibana.service sudo systemctl stop logstash.service # es 설정 추가 sudo vi /etc/elasticsearch/elasticsearch.yml xpack.security.enabled: true xpack.security.transport.ssl.enabled: true # es 서비스 실행 sudo systemctl start elasticsearch.service # 패스워드 설정 sudo /usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive # kibana 설정 수정 sudo vi /etc/kibana/kibana.yml elasticsearch.username: "elastic" elasticsearch.password: "설정한 패스워드" # kibana 서비스 실행 sudo systemctl start kibana.service # logstash 설정 추가 sudo vi /etc/logstash/conf.d/logstash.conf output { elasticsearch { user => "elastic" password => "설정한 패스워드" } } # logstash 서비스 실행 sudo systemctl start logstash.service | cs |
안녕하세요 좋은 게시글 감사합니다.
kibna 실행시에 라이센스 에러가 발생하는데 유료 서비스만 사용이 가능한걸까요?
{"statusCode":503,"error":"Service Unavailable","message":"License is not available."}