ElasticSearch installation and operation of the pit

A confirmed centos system was installed for the 64-bit, not of the x86

1. Download elasticsearch package

2. extracting archive tar -zxvf

3. Add a user elk, elasticsearch7 inoperative root user

4. Create a new user must use the chown -R username folder: assign permissions

Second, the configuration enables external network access

clipboard

Third, the processing system is configured three

1、max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

  The maximum number of files open at the same time each process is too small, you can view the current number of the following two commands

ulimit -Hn ulimit -Sn

  /Etc/security/limits.conf modify files, increase the allocation, log back into effect after the user exits

* Soft * hard nofile nofile 65536 65536

48-776330364

2、max number of threads [3818] for user [es] is too low, increase to at least [4096]

  The problem above, the maximum number of threads is too low. Modify the configuration file /etc/security/limits.conf, increase the allocation

soft    nproc           4096
hard    nproc           4096

  Can be viewed via the command

Ulimit -Hu Ulimit -su

6-1676615485

3、max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

  Modify /etc/sysctl.conf file, increase the allocation vm.max_map_count = 262144

we /etc/sysctl.conf

sysctl -p

  Run sysctl -p take effect

26-366544473

Right limits.conf

clipboard

Fourth, the problem of handling bootstrap checks failed

[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

It's time to edit elasticsearch.yml file, # cluster.initial_master_nodes: [ "node-1", "node-2"] amended as cluster.initial_master_nodes: [ "node-1"],

clipboard

Another solution:

报错:ERROR: bootstrap checks failed

      Solution: Configure the elasticsearch.yml in bootstrap.system_call_filter is false, to the following in Memory:

                 bootstrap.memory_lock: false

                 bootstrap.system_call_filter: false

Guess you like

Origin www.cnblogs.com/cqhaibin/p/11221845.html