美文网首页
elasticsearch+kibana入门安装篇

elasticsearch+kibana入门安装篇

作者: 小伟_be27 | 来源:发表于2019-11-23 16:04 被阅读0次

    1.安装jdk

    登录oracle官网
    https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

    image.png
    λ java -version
    java version "1.8.0_231"
    Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
    

    2.git下载elasticsearch-rtf

    git clone git://github.com/medcl/elasticsearch-rtf.git -b master --depth 1
    

    windows用户

    cd elasticsearch/bin
    elasticsearch.bat
    

    看到以下消息,表示成功!


    image.png

    3.git下载elasticsearch-head

    git clone git://github.com/mobz/elasticsearch-head.git
    登录nodejs官网:
    https://nodejs.org/zh-cn/download/

    #修改npm镜像为国内淘宝镜像
    npm install cnpm -g --registry=https://registry.npm.taobao.org
    cd elasticsearch-head
    cnpm install
    cnpm run start
    

    谷歌浏览器访问localhost:9100,可以看到以下消息:


    image.png

    集群健康值:未连接
    默认不允许第三方插件连接
    可以配置es的config目录下的:
    elasticsearch.yml文件结尾追加:

    http.cors.enabled: true
    http.cors.allow-origin: "*"
    http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
    http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
    

    集群健康值:绿色!连接成功!


    image.png

    4.安装kibana
    可以先查看es安装的版本,kibana版本应该和es对应
    es版本5.1.1

    image.png
    下载kibana地址:https://www.elastic.co/cn/downloads/past-releases#kibana image.png

    配置kibana.yml

    elasticsearch.url: "http://localhost:9201"
    
    cd D:\kibana-5.1.2\bin
    kibana.bat
    

    在本地localhost:5601可以访问到下面页面:


    相关文章

      网友评论

          本文标题:elasticsearch+kibana入门安装篇

          本文链接:https://www.haomeiwen.com/subject/bvjhwctx.html