• ElasticSearch和Kibanna的安装与启动


    我们可以到Elastic Search的官网下载Elastic Search:官网.(此处无力吐槽国外的镜像地址是真的真的慢呀~)。传送门传送华为云Elastic Search镜像

    下载Elastic Search 7.4.2

    saplsY

    上传至Linux服务器

    UkqEDc

    解压缩并移动

    # 解压缩
    tar -zxvf elasticsearch-7.4.2-linux-x86_64.tar.gz
    # 移动
    mv elasticsearch-7.4.2 /usr/local/
    

    Xpl1ry

    修改配置文件

    修改elasticsearch.yml的配置

    cluster.name: my-elasticsearch
    
    node.name: node-1
    
    path.data: /usr/local/elasticsearch-7.4.2/data
    
    path.logs: /usr/local/elasticsearch-7.4.2/logs
    
    network.host: 0.0.0.0
    
    http.port: 9200
    
    cluster.initial_master_nodes: ["es-node1"]
    

    修改jvm.options

    # Xms represents the initial size of total heap space
    # Xmx represents the maximum size of total heap space
    
    -Xms128m
    -Xmx128m
    

    创建非root用户

    # 添加esuser用户
    useradd esuser
    # 赋予esuser用户权限
    chown -R esuser:esuser /usr/local/elasticsearch-7.4.2
    

    启动ElasticSearch

    su esuser
    ./elasticsearch
    

    出现报错<也是常见的坑之一>

    1BHgym

    解决报错

    # 切换到root
    su root
    # 
    vi /etc/security/limits.conf 添加如下内容
    
    * soft nofile 65535
    * hard nofile 65536
    * soft nproc 4048
    * hard nproc 4096
     
    vi /etc/sysctl.conf 下方添加如下内容
    vm.max_map_count=262145
    刷新配置
    sysctl -p
    

    WexVS4

    启动ElasticSearch

    xRHxqW

    浏览器访问9200端口

    ip:9200

    W5Hwid

    ElasticSearch后台启动

    # -d daemonize 守护进程
    ./elasticsearch -d
    

    关闭进程

    jps
    kill 2329
    

    lx8qI5

    使用Kibanna进行可视化操作

    传送门:华为云Kibana

    上传压缩包

    HUh5jb

    解压缩并移动

     # 解压缩
     tar -zxvf kibana-7.4.2-linux-x86_64.tar.gz
     # 移动
     mv kibana-7.4.2-linux-x86_64 /usr/local
    

    修改配置文件

    server.port:5601
    server.host:0.0.0.0
    elasticsearch.hosts: ["http://172.16.31.134:9200"]
    kibana.index:".kibana"
    

    授权用户

    # 同样不能以root用户启动 授权esuser用户操作权限
    chown -R esuser:esuser /usr/local/kibana-7.4.2-linux-x86_64/
    

    启动kibana

    ./kibana
    

    HxyBHh

    启动浏览器访问Kibana

    3VMAtx点击小扳手 即可进入console交互

  • 相关阅读:
    finereport 文档
    FineRport 工作用
    SQL 排序
    fineReport
    python | Mysql 索引优化分析
    python | 缓存穿透、缓存雪崩和缓存击穿面试题
    python | Jenkins构建Spring Boot 详细步骤
    python | MySQL全面查询的正则匹配
    python | TCP 三次握手和四次挥手图解(有限状态机)
    python | 3款工具实现快速K8S开发
  • 原文地址:https://www.cnblogs.com/shine-rainbow/p/12895795.html
Copyright © 2020-2023  润新知