centos安装elasticsearch6.3.2方法

时间:2020-05-01

下载地址:https://www.elastic.co/downloads/elasticsearch

下面是centos安装6.3.2方法

elasticsearch-6-3-2:https://www.elastic.co/downloads/past-releases/elasticsearch-6-3-2

https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.2.rpm

安装java

yum install java

确认Java是否安装成功

java -version

安装elasticsearch

rpm -ivh elasticsearch-6.3.2.rpm

设置为开机自启

systemctl daemon-reload

systemctl enable elasticsearch.service

启动elasticsearch

systemctl start elasticsearch.service

设置elasticsearch最大内存

elasticsearch配置文件在/etc/elasticsearch

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
-Xms300m
-Xmx300m

参考:https://www.elastic.co/guide/cn/elasticsearch/guide/current/heap-sizing.html

https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html

重新启动

/etc/init.d/elasticsearch restart