CentOS7下安装Kibana

wylc123 1年前 ⋅ 588 阅读

第一步、将安装包拖到目标目录:

/usr/elasticsearch/

第二步、解压缩:

输入命令:

tar -zxvf kibana-7.6.2-linux-x86_64.tar.gz

第三步、修改配置:

修改配置文件kibana.yml:

进入到kibana-7.6.2-linux-x86_64下的config文件夹:

server.port: 5601
server.host: "0.0.0.0"
elasticsearch.hosts: ["http://localhost:9200"]
elasticsearch.username: "kibana"
elasticsearch.password: "1qaz2wsx#EDC"
i18n.locale: "zh-CN"

第四步、开启5601端口:

如果防火墙是关闭的,首先打开防火墙,否则没办法开启5601端口:

输入命令、开启防火墙:

systemctl start firewalld.service

开启防火墙后,添加5601端口:

firewall-cmd --permanent --zone=public --add-port=5601/tcp

出现success说明这个端口开启成功了。

  1. 重启防火墙:

firewall-cmd --reload

第五步、启动kibana:

启动kibana之前,需要先启动ElasticSearch:

启动ElasticSearch:
进入ElasticSearch安装包下的bin目录,输入命令:

./elasticsearch -d  后台运行

然后:

启动Kibana:
进入kibana安装目录下的bin目录,输入命令:
./kibana

如果提示这个错误:

Kibana should not be run as root. Use --allow-root to continue

那就用这个命令:

./kibana --allow-root
(允许root用户去启动)

或者使用安装es时添加的用户启动

su elsearch

后台启动命令,需要进入安装根目录

nohup bin/kibana &

第六步、关闭kibana的方法

[elsearch@ecs-678c java]$ ps -ef | grep node
elsearch 11076 10981  1 20:47 pts/2    00:01:24 bin/../node/bin/node bin/../src/cli
elsearch 12088 12062  0 22:07 pts/4    00:00:00 grep --color=auto node
[elsearch@ecs-678c java]$ netstat -anltp|grep 5601
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:5601            0.0.0.0:*               LISTEN      11076/bin/../node/b
[elsearch@ecs-678c java]$ kill -9 11076

第七步、遇到的问题:

问题1描述
控制台启动日志最后报错,错误内容:

[Screenshot here] log [02:25:38.464] [error][reporting] The Reporting plugin encountered issues launching Chromium in a self-test. You may have trouble generating reports. log [02:25:38.465] [error][reporting] ErrorEvent { target: WebSocket { _events: [Object: null prototype] { open: [Function], error: [Function] }, _eventsCount: 2, _maxListeners: undefined, readyState: 3, protocol: ‘’, _binaryType: ‘nodebuffer’, _closeFrameReceived: false, _closeFrameSent: false, _closeMessage: ‘’, _closeTimer: null, _closeCode: 1006, _extensions: {}, _receiver: null, _sender: null, _socket: null, _isServer: false, _redirects: 0, url: ‘ws://127.0.0.1:45871/devtools/browser/7e246271-fac4-4eed-99c0-28ace04c7e45’, _req: null }, type: ‘error’, message: ‘socket hang up’, error: { Error: socket hang up at createHangUpError (_http_client.js:323:15) at Socket.socketOnEnd (_http_client.js:426:23) at Socket.emit (events.js:194:15) at endReadableNT (_stream_readable.js:1103:12) at process._tickCallback (internal/process/next_tick.js:63:19) code: ‘ECONNRESET’ } } log [02:25:38.469] [warning][reporting] See Chromium’s log output at “/kibana/kibana-7.5.1-linux-x86_64/data/headless_shell-linux/chrome_debug.log” log [02:25:38.469] [warning][reporting] Reporting plugin self-check failed. Please check the Kibana Reporting settings. Error: Could not close browser client handle!

解决方案:
安装以下链接中的包文件:

yum install 下面的包文件后重启即可。

ipa-gothic-fonts
xorg-x11-fonts-100dpi
xorg-x11-fonts-75dpi
xorg-x11-utils
xorg-x11-fonts-cyrillic
xorg-x11-fonts-Type1
xorg-x11-fonts-misc
fontconfig
freetype

问题2描述

Error: EACCES: permission denied, open '/usr/softs/elasticsearch/kibana-7.5.1-linux-x86_64/data/uuid'

这是用非root用户启动,文件夹权限问题导致

可使用命令给data文件夹赋权给elsearch用户

chown elsearch:elsearch data/ -R

相关文章推荐

全部评论: 0

    我有话说: