kibana的部署

安装kibana
  • 解压相应的软件包
tar -xf kibana-6.5.4-linux-x86_64.tar.gz -C /usr/local/  #解压重定向
mv /usr/local/kibana-6.5.4-linux-x86_64/ /usr/local/kibana  #重命名
  • 修改配置文件
vi /usr/local/kibana/config/kibana.yml
server.port: 5601
server.host: "192.168.92.133"    //本机的IP
elasticsearch.url: "http://192.168.92.134:9200"    //es的IP
kibana.index: ".kibana"

  • 启动
cd /usr/local/kibana
nohup ./bin/kibana &

注意:kibana到这里已经安装成功,可以在浏览器中输入IP:5601访问

在这里插入图片描述

安装nginx 实现反向代理
安装nginx

如果你想要安装aginx,请点击nginx的编译安装nginx的yum安装

配置nginx

请点击nginx实现proxy代理

nginx的主配置文件
user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
    use epoll;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  120;
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 128k;
  #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}


nginx 子配置文件
server {
    listen       80;
    server_name  192.168.192.132;

    #charset koi8-r;
    #access_log  /var/log/nginx/host.access.log  main;

    location / {

             auth_basic "Kibana";
             auth_basic_user_file /etc/nginx/passwd.db;
             proxy_pass http://192.168.192.132:5601;
             proxy_set_header Host $host:5601;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header Via "nginx";
        }
location /status {
             stub_status on;
             access_log /var/log/nginx/kibana_status.log;
             auth_basic "NginxStatus"; }

         location /head/{
             auth_basic "head";
             auth_basic_user_file /etc/nginx/passwd.db;
             proxy_pass http://192.168.192.130:9100;
             proxy_set_header Host $host:9100;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header Via "nginx";
                         }
#error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}

设置登录用户和密码
htpasswd -cm /etc/nginx/passwd.db hualaotou    #用户名

在这里插入图片描述
如果报错,没有htpasswd命令。需要下载安装httpd
yum -y install httpd
在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值