1.Elasticsearch
- 官网下载压缩包
- 解压
tar -zxvf elasticsearch-7.15.0
创建es用户,不推荐使用root用户启动es
adduser es
passwd es
编写启动脚本
vim start-es.sh
#!/bin/bash
cd /software/elasticsearch/elasticsearch-7.15.0/bin
nohup ./elasticsearch > /software/elasticsearch/logs/start-elasticsearch.log 2>&1 &
授权
chown -R es /software/elasticsearch
chmod +x start-es.sh
chmod 777 start-es.sh
修改配置
vim elasticsearch/elasticsearch-7.15.0/config/elasticsearch.yaml
# 如不修改es只能本地访问
network.host: 0.0.0.0
cluster.initial_master_nodes: ["node-1"]
环境配置
vim /etc/security/limits.conf
,追加内容
* soft nofile 65536
* hard nofile 65536
vim /etc/sysctl.conf
,追加内容
vm.max_map_count=262144
- 启动elasticsearch
start-es.sh
-
2.Kibana
官网下载压缩包
- 解压
tar -zxvf kibana-7.15.0
编写启动脚本
vim start-kibana.sh
#!/bin/bash
cd /software/elasticsearch/kibana-7.15.0/bin
nohup ./kibana > /software/elasticsearch/logs/start-elasticsearch.log 2>&1 &
修改配置
vim elasticsearch/kibana-7.15.0/config/kibana.yaml
server.host: "192.168.113.140"
启动kibana
start-kibana.sh
- 测试,浏览器访问ip:5601