Kibana

1、下载Kibana的rpm包:

wget https://artifacts.elastic.co/downloads/kibana/kibana-7.4.2-x86_64.rpm

2. 安装Kibana

rpm install -y kibana-7.4.2-x86_64.rpm

3.配置

grep '^[a-Z]' /etc/kibana/kibana.yml  
server.port: 5601
server.host: "127.0.0.1"
elasticsearch.url: "http://192.168.1.1:9200"

4. 安装nginx

yum install nginx

5. 添加kibana反向代理

upstream kibana_server {
    server 127.0.0.1:5601 weight=1 max_fails=3 fail_timeout=60;
}

server {

        listen 80;
        server_name www.kibana5601.com;
        location /{
          proxy_pass http://kibana_server;
          proxy_http_version 1.1;
          proxy_set_header Upgrade  $http_upgrade;
          proxy_set_header Connection 'upgrade'; 
          proxy_set_header Host $host;
          proxy_cache_bypass $http_ypgrade; 
        }
       }

6.安装密码文件

yum install httpd_tools
htpasswd -bc /etc/nginx/htpass.txt kibana 123456
 chown nginx.nginx /etc/nginx/htpass.txt

7.nginx 添加验证

auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/htpass.txt;

8. 重启服务  用密码登录

 

posted @ 2019-11-27 14:47  Richie`  阅读(168)  评论(0编辑  收藏  举报