본문 바로가기

퍼블릭 클라우드

[aws] ec2 인스턴스(amazon linux 2)에 kibana를 설치하기

반응형

ec2 인스턴스(amazon linux 2)에 kibana를 설치하기

kibana 설치하기

wget -q https://artifacts.elastic.co/downloads/kibana/kibana-8.6.1-x86_64.rpm
wget -q https://artifacts.elastic.co/downloads/kibana/kibana-8.6.1-x86_64.rpm.sha512
shasum -a 512 -c kibana-8.6.1-x86_64.rpm
$ shasum -a 512 -c kibana-8.6.1-x86_64.rpm
shasum: kibana-8.6.1-x86_64.rpm: no properly formatted SHA1 checksum lines found
yum install -y kibana-8.6.1-x86_64.rpm

kibana에 대한 등록 토큰 생성

/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana
$ /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana
eyJ2ZXIiOiI4LjYuMSIsImFkciI6WyIxMC4yMDEuOC4yNDY6OTIwMCJdLCJmZ3IiOiI2ZmI4Njadsf
systemctl daemon-reload
systemctl --now enable kibana

kibana_system password reset

/usr/share/elasticsearch/bin/elasticsearch-reset-password -u kibana_system
$ /usr/share/elasticsearch/bin/elasticsearch-reset-password -u kibana_system
This tool will reset the password of the [kibana_system] user to an autogenerated value.
The password will be printed in the console.
Please confirm that you would like to continue [y/N]y


Password for the [kibana_system] user successfully reset.
New value: kSEEjtsgDBfe-c-Mq3jH

계정, 패스워드 확인

curl -s -u kibana_system:kSEEjtsgDBfe-c-Mq3jH https://127.0.0.1:9200 -k | jq
$ curl -s -u kibana_system:kSEEjtsgDBfe-c-Mq3jH https://127.0.0.1:9200 -k | jq
{
  "name": "es-01",
  "cluster_name": "elasticsearch",
  "cluster_uuid": "5DxCf5tdSh2KNTykFOZ2XQ",
  "version": {
    "number": "8.6.1",
    "build_flavor": "default",
    "build_type": "rpm",
    "build_hash": "180c9830da956993e59e2cd70eb32b5e383ea42c",
    "build_date": "2023-01-24T21:35:11.506992272Z",
    "build_snapshot": false,
    "lucene_version": "9.4.2",
    "minimum_wire_compatibility_version": "7.17.0",
    "minimum_index_compatibility_version": "7.0.0"
  },
  "tagline": "You Know, for Search"
}

kibana 설정 파일(kibana.yml)

cat /etc/kibana/kibana.yml | egrep -v '^$|^#'
$ cat /etc/kibana/kibana.yml | egrep -v '^$|^#'
server.port: 5601
server.host: "0.0.0.0"
elasticsearch.hosts: ["https://localhost:9200"]
elasticsearch.username: "kibana_system"
elasticsearch.password: "kSEEjtsgDBfe-c-Mq3jH"
logging:
  appenders:
    file:
      type: file
      fileName: /var/log/kibana/kibana.log
      layout:
        type: json
  root:
    appenders:
      - default
      - file
pid.file: /run/kibana/kibana.pid

 

참고URL

- kibana 설치 : Install Kibana with RPM

 

728x90
반응형