# Ubuntu安装kibana

安装

注意: 如果sudo apt install npm出现如下错误

root@iZbp1aqs02dp5tbo0dt8rkZ:/data/kibana# apt install npm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package npm

则使用 sudo apt-get update进行更新,然后继续

cd /home
wget https://artifacts.elastic.co/downloads/kibana/kibana-7.16.3-linux-x86_64.tar.gz
tar -zxvf kibana-7.16.3-linux-x86_64.tar.gz -C /data
mv kibana-7.16.3-linux-x86_64 kibana
useradd kibana
chown -R kibana:kibana kibana #此部分一定要进入data目录,data目录为作者安装的根目录,kibana存放在data目录
cd /data/kibana
sudo apt install npm
npm install
vim config/kibana.yml
vim /etc/systemd/system/kibana.service
systemctl daemon-reload
systemctl enable kibana
systemctl start kibana
systemctl status kibana

kibana.yml

打开如下配置

server.port: 5601
server.host: "0.0.0.0"
elasticsearch.hosts: ["http://127.0.0.1:9200"]

kibana.service

[Unit]
Description=Kibana
StartLimitIntervalSec=30
StartLimitBurst=3

[Service]
Environment=KIBANA_HOME=/data/kibana
WorkingDirectory=/data/kibana

# 指定用户组
User=kibana
Group=kibana

ExecStart=/data/kibana/bin/kibana "-c /data/kibana/config/kibana.yml"

Restart=always
WorkingDirectory=/

[Install]
WantedBy=multi-user.target

访问

http://127.0.0.1:5601/app/kibana

ES集群只要在其中一台安装即可

你可能感兴趣的:(kibana7,ubuntu,linux,elasticsearch)