1. Download the installation package
2. Upload to Linux
3. decompression:
cd /usr/local/tars
tar -zxvf elasticsearch-5.6.2.tar.gz -C /usr/local
4. New Directory
cd /usr/local/elasticsearch-5.6.2
mkdir data
mkdir logs
5. modify the configuration file:
cd /usr/local/elasticsearch-5.6.2/config
vi elasticsearch.yml
Modifications are as follows:
cluster.name: my-application
node.name: hadoop1
path.data: /usr/local/elasticsearch-5.6.2/data
path.logs: /usr/local/elasticsearch-5.6.2/logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: hadoop1
discovery.zen.ping.unicast.hosts: ["hadoop1"]
6. Modify limits.conf file
vi /etc/security/limits.conf
//在文件末尾添加如下内容
* soft nofile 655360
* hard nofile 131072
* soft nproc 4096
* hard nproc 4096
File under 7. Modify limit.d
vi /etc/security/limits.d/20-nproc.conf
//修改内容如下
* soft nproc 1024
//改为
* soft nproc 4096
8. Modify the sysctl.conf file
vi /etc/sysctl.conf
//添加内容
vm.max_map_count=655360
9. New User, elasticsearch root user can not start
useradd hduser
cd /user/local
chown -R hduser ./elasticsearch-5.6.2/
chgrp -R hduser ./elasticsearch-5.6.2/
10. Switch to hduser user, start elasticsearch
su hduser
cd /usr/local/elasticsearch-5.6.2
./bin/elasticsearch -d //后台启动