1.Elasticsearch

  1. 官网下载压缩包
  2. 解压 tar -zxvf elasticsearch-7.15.0
  3. 创建es用户,不推荐使用root用户启动es

    1. adduser es
    2. passwd es
  4. 编写启动脚本vim start-es.sh

    1. #!/bin/bash
    2. cd /software/elasticsearch/elasticsearch-7.15.0/bin
    3. nohup ./elasticsearch > /software/elasticsearch/logs/start-elasticsearch.log 2>&1 &
  5. 授权

    1. chown -R es /software/elasticsearch
    2. chmod +x start-es.sh
    3. chmod 777 start-es.sh
  6. 修改配置vim elasticsearch/elasticsearch-7.15.0/config/elasticsearch.yaml

    1. # 如不修改es只能本地访问
    2. network.host: 0.0.0.0
    3. cluster.initial_master_nodes: ["node-1"]
  7. 环境配置

vim /etc/security/limits.conf,追加内容

  1. * soft nofile 65536
  2. * hard nofile 65536

vim /etc/sysctl.conf,追加内容

  1. vm.max_map_count=262144
  1. 启动elasticsearchstart-es.sh
  2. 测试,浏览器访问ip:9200

    2.Kibana

  3. 官网下载压缩包

  4. 解压tar -zxvf kibana-7.15.0
  5. 编写启动脚本vim start-kibana.sh

    1. #!/bin/bash
    2. cd /software/elasticsearch/kibana-7.15.0/bin
    3. nohup ./kibana > /software/elasticsearch/logs/start-elasticsearch.log 2>&1 &
  6. 修改配置vim elasticsearch/kibana-7.15.0/config/kibana.yaml

    1. server.host: "192.168.113.140"
  7. 启动kibanastart-kibana.sh

  8. 测试,浏览器访问ip:5601