ElasticSearch 6.3.0 installation and configuration

1. Environmental preparation

1.1 Use a virtual machine to install centos, as shown below

Insert picture description here
For installing centos in a virtual machine, please refer to: Installing CentOS7 in VirtualBox (Mac version)

1.2 Turn off the firewall in centos

## 查看防火墙状态
firewall-cmd --state

## 停止firewall
systemctl stop firewalld.service

## 禁止firewall开机启动
systemctl disable firewalld.service 

Insert picture description here

1.3 Install jdk1.8

Installation package version: jdk-8u231-linux-x64.tar.gz The
specific installation process can refer to: Install jdk on Centos server

2. Installation of ElasticSearch

ElasticSearch安装包版本说明:elasticsearch-6.3.0.tar.gz

2.1 Create che user

groupadd -g 5000 che
useradd -g che -u 5000 che

2.2 Create the /data directory and assign permissions to the che user

chown -R che:che /data

2.3 Copy the installation package of ElasticSearch to the /data directory and unzip it

tar -zxvf elasticsearch-6.3.0.tar.gz

chown -R che:che /data/elasticsearch-6.3.0

3. Preparation of ElasticSearch

3.1 Modify /etc/security/limits.conf, add the following content:

* soft nproc 4096
* hard nproc 4096

* soft nofile 65536
* hard nofile 65536

Insert picture description here

3.2 Modify the /etc/sysctl.conf file to add vm.max_map_count=262144, and execute sysctl -p

Insert picture description here

3.3 ElasticSearch configuration file, /data/elasticsearch-6.3.0/config/elasticsearch.yml

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

Insert picture description here

network.host: 0.0.0.0
http.port: 9200

Insert picture description here

path.data: /opt/data/elasticsearch
path.logs: /opt/logs/elasticsearch

Note: Remember to create the /opt/data/elasticsearch/, /opt/logs/elasticsearch directories, and grant permissions to the che user

chown -R che:che /opt/data/elasticsearch/
chown -R che:che /opt/logs/elasticsearch/

Insert picture description here

3.4 Start ElasticSearch service

As shown in the figure below, switch to
Insert picture description here
and enter http://192.168.1.102:9002 in the browser to access, as shown in the figure below
Insert picture description here

Guess you like

Origin blog.csdn.net/ytangdigl/article/details/108573228