Kibana7.2的安裝和配置

環(huán)境說明

Centos7、Elasticsearch7.2均已安裝完成
具體安裝過程可在主頁查看

下載Kibana7.2安裝包

[root@localhost tar.gz]# pwd
/usr/local/src/tar.gz
[root@localhost tar.gz]# wget https://artifacts.elastic.co/downloads/kibana/kibana-7.2.0-linux-x86_64.tar.gz

百度云
鏈接:https://pan.baidu.com/s/1cAAjgTn1KGXcolykjBx-vQ
提取碼:9kzo

[root@localhost tar.gz]# ll
total 720168
-rw-r--r--. 1 root root 336647987 Aug  2 11:39 elasticsearch-7.2.0-linux-x86_64.tar.gz
-rw-r--r--. 1 root root 213198521 Aug  2 16:54 kibana-7.2.0-linux-x86_64.tar.gz
-rw-r--r--. 1 root root 187599951 Aug  2 15:31 openjdk-11.0.1_linux-x64_bin.tar.gz

解壓到指定目錄

# 解壓
[root@localhost tar.gz]# tar -xzvf kibana-7.2.0-linux-x86_64.tar.gz -C /usr/local/src/

#文件夾重命名
[root@localhost tar.gz]# cd ..
[root@localhost src]# ll
total 0
drwxr-xr-x.  9 esuser root 154 Jun 20 23:56 elasticsearch
drwxr-xr-x. 15 root   root 285 Aug  2 16:56 kibana-7.2.0-linux-x86_64
drwxr-xr-x.  2 root   root 136 Aug  2 16:54 tar.gz
[root@localhost src]# mv kibana-7.2.0-linux-x86_64/ ./kibana
[root@localhost src]# ll
total 0
drwxr-xr-x.  9 esuser root 154 Jun 20 23:56 elasticsearch
drwxr-xr-x. 15 root   root 285 Aug  2 16:56 kibana
drwxr-xr-x.  2 root   root 136 Aug  2 16:54 tar.gz

修改kibana配置文件

# Kibana is served by a back end server. This setting specifies the port to use.
server.port: 5601

# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is 'localhost', which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address.
server.host: "192.168.116.141"

# Enables you to specify a path to mount Kibana at if you are running behind a proxy.
# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
# from requests it receives, and to prevent a deprecation warning at startup.
# This setting cannot end in a slash.
#server.basePath: ""

# Specifies whether Kibana should rewrite requests that are prefixed with
# `server.basePath` or require that they are rewritten by your reverse proxy.
# This setting was effectively always `false` before Kibana 6.3 and will
# default to `true` starting in Kibana 7.0.
#server.rewriteBasePath: false

# The maximum payload size in bytes for incoming server requests.
#server.maxPayloadBytes: 1048576

# The Kibana server's name.  This is used for display purposes.
#server.name: "your-hostname"

# The URLs of the Elasticsearch instances to use for all your queries.
elasticsearch.hosts: ["http://192.168.116.141:9200"]

# When this setting's value is true Kibana uses the hostname specified in the server.host
# setting. When the value of this setting is false, Kibana uses the hostname of the host
# that connects to this Kibana instance.
#elasticsearch.preserveHost: true

# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
# dashboards. Kibana creates a new index if the index doesn't already exist.
#kibana.index: ".kibana"

# The default application to load.
#kibana.defaultAppId: "home"

# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
#elasticsearch.username: "esuser"
#elasticsearch.password: "123456"

# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
# These settings enable SSL for outgoing requests from the Kibana server to the browser.
#server.ssl.enabled: false
#server.ssl.certificate: /path/to/your/server.crt
#server.ssl.key: /path/to/your/server.key

# Optional settings that provide the paths to the PEM-format SSL certificate and key files.
# These files validate that your Elasticsearch backend uses the same key files.
#elasticsearch.ssl.certificate: /path/to/your/client.crt
#elasticsearch.ssl.key: /path/to/your/client.key

# Optional setting that enables you to specify a path to the PEM file for the certificate
# authority for your Elasticsearch instance.
#elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]

# To disregard the validity of SSL certificates, change this setting's value to 'none'.
#elasticsearch.ssl.verificationMode: full

# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of
# the elasticsearch.requestTimeout setting.
#elasticsearch.pingTimeout: 1500

# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
# must be a positive integer.
#elasticsearch.requestTimeout: 30000

# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
# headers, set this value to [] (an empty list).
#elasticsearch.requestHeadersWhitelist: [ authorization ]

# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten
# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.
#elasticsearch.customHeaders: {}

# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
#elasticsearch.shardTimeout: 30000

# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
#elasticsearch.startupTimeout: 5000

# Logs queries sent to Elasticsearch. Requires logging.verbose set to true.
#elasticsearch.logQueries: false

# Specifies the path where Kibana creates the process ID file.
#pid.file: /var/run/kibana.pid

# Enables you specify a file where Kibana stores log output.
#logging.dest: stdout

# Set the value of this setting to true to suppress all logging output.
#logging.silent: false

# Set the value of this setting to true to suppress all logging output other than error messages.
#logging.quiet: false

# Set the value of this setting to true to log all events, including system usage information
# and all requests.
#logging.verbose: false

# Set the interval in milliseconds to sample system and process performance
# metrics. Minimum is 100ms. Defaults to 5000.
#ops.interval: 5000

# Specifies locale to be used for all localizable strings, dates and number formats.
#i18n.locale: "en"

啟動(dòng)kibana

[root@localhost bin]# ./kibana
Kibana should not be run as root.  Use --allow-root to continue.

kibana不建議以root用戶啟動(dòng),如果用root啟動(dòng),需要加--allow-root
更改命令

[root@localhost bin]# ./kibana --allow-root

啟動(dòng)時(shí)間有點(diǎn)長,稍等一會(huì)....

  log   [09:07:15.633] [info][status][plugin:kibana@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.643] [info][status][plugin:elasticsearch@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.645] [info][status][plugin:xpack_main@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.657] [info][status][plugin:graph@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.670] [info][status][plugin:monitoring@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.672] [info][status][plugin:spaces@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.680] [warning][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml
  log   [09:07:15.681] [warning][security] Session cookies will be transmitted over insecure connections. This is not recommended.
  log   [09:07:15.698] [info][status][plugin:security@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.699] [info][status][plugin:searchprofiler@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.700] [info][status][plugin:ml@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.736] [info][status][plugin:tilemap@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.737] [info][status][plugin:watcher@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.745] [info][status][plugin:grokdebugger@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.748] [info][status][plugin:dashboard_mode@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.749] [info][status][plugin:logstash@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.754] [info][status][plugin:beats_management@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.767] [info][status][plugin:apm_oss@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.775] [info][status][plugin:apm@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.776] [info][status][plugin:code@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.778] [info][status][plugin:tile_map@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.779] [info][status][plugin:task_manager@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.781] [info][status][plugin:maps@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.784] [info][status][plugin:interpreter@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.798] [info][status][plugin:canvas@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.801] [info][status][plugin:license_management@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.803] [info][status][plugin:cloud@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.804] [info][status][plugin:index_management@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.812] [info][status][plugin:console@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.813] [info][status][plugin:console_extensions@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.816] [info][status][plugin:notifications@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.817] [info][status][plugin:index_lifecycle_management@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.828] [info][status][plugin:metrics@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.856] [info][status][plugin:infra@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.857] [info][status][plugin:rollup@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.862] [info][siem] Plugin initializing
  log   [09:07:15.885] [info][siem] Plugin done initializing
  log   [09:07:15.886] [info][status][plugin:siem@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.887] [info][status][plugin:remote_clusters@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.891] [info][status][plugin:cross_cluster_replication@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.897] [info][status][plugin:translations@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.904] [info][status][plugin:upgrade_assistant@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.912] [info][status][plugin:uptime@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.914] [info][status][plugin:oss_telemetry@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.915] [warning][encrypted_saved_objects] Generating a random key for xpack.encrypted_saved_objects.encryptionKey. To be able to decrypt encrypted saved objects attributes after restart, please set xpack.encrypted_saved_objects.encryptionKey in kibana.yml
  log   [09:07:15.916] [info][status][plugin:encrypted_saved_objects@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:15.942] [info][status][plugin:snapshot_restore@7.2.0] Status changed from uninitialized to yellow - Waiting for Elasticsearch
  log   [09:07:15.944] [info][status][plugin:data@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:16.099] [info][status][plugin:timelion@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:16.101] [info][status][plugin:ui_metric@7.2.0] Status changed from uninitialized to green - Ready
  log   [09:07:17.283] [info][status][plugin:elasticsearch@7.2.0] Status changed from yellow to green - Ready
  log   [09:07:18.551] [info][license][xpack] Imported license information from Elasticsearch for the [data] cluster: mode: basic | status: active
  log   [09:07:18.633] [info][status][plugin:xpack_main@7.2.0] Status changed from yellow to green - Ready

成功

防火墻開啟5601端口

[root@localhost ~]# firewall-cmd --zone=public --add-port=5601/tcp --permanent 
success
[root@localhost ~]# systemctl restart firewalld.service
[root@localhost ~]# 

瀏覽器訪問
http://192.168.116.141:5601

image.png

最常用的命令行工具Dev Tools

image.png

安裝完成

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容