目录
一.下载Elasticsearh
Download Elasticsearch | Elastic
自己下载的 8.0.0 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.0.0-linux-x86_64.tar.gz
wget https://artifacts.elastic.co/downloads/logstash/logstash-8.0.0-linux-x86_64.tar.gz
二.解压 创建需要的文件目录
tar -zxvf elasticsearch-8.0.0-linux-x86_64.tar.gz
mkdir /data/elasticsearch/data /data/elasticsearch/logs
chmod 777 /data/elasticsearch
三.修改配置文件
jvm.options 具体要不要添加不知道,看网上说要加就加,用的虚拟机所有用的1g,其他根据实际情况修改
################################################################
-Xms1g
-Xmx1g
################################################################
elasticsearch.yml 下面的地址用的是第二点创建的地址,修改xpack.security.enabled: false,修改enabled: false 否则访问的时候时候报错,文章最后会列出来遇到的报错
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /data/elasticsearch/data
#
# Path to log files:
#
path.logs: /data/elasticsearch/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network