Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Big data's fifth part: ELK installation

Shulou Source: shulou.com Published: 2022-06-02 20:29:45 10月05日 Update

Big data developed Volume 5

​-Elasticsearch distributed installation steps

Consider the need to install elasticsearch-head as a web presentation, so the first installation of nodejs is mainly using npm.

Wget https://npm.taobao.org/mirrors/node/v11.0.0/node-v11.0.0.tar.gz

Tar-zxvf node-v11.0.0.tar.gz

Cd node-v11.0.0

Yum install gcc gcc-c++

. / configure

Make

Make install

Node-v

Start installing elasticsearch

1. Install 3 virtual machines

2. Install jdk

Decompress tar-zxvf elasticsearch7.2.2

Switch user su cm (elasticsearch cannot be started under root user)

After startup, the host cannot access the processing scheme (startup command: sh elasticsearch in the bin directory)

A) modify config/elasticsearch.yml

Cluster.name: es-app # cluster name, which can be modified by yourself

Node.name: es-1 # node name, modify it by yourself

Network.host: 192.168.235.133 # host address, here write native IP

Http.port: 9200 # port

Http.cors.enabled: true # setting cross-domain

Http.cors.allow-origin: "*" # set access

B) start again to see why it cannot be started

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

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

​ i. Problem 1 the maximum number of files in the system is too low

Modify the append at the end of vi / etc/security/limits.conf file

Cm soft nofile 65536

Cm hard nofile 131072

Cm soft nproc 4096

Cm hard nproc 4096

​ ii. Problem 2 Virtual memory is too low

Modify the append at the end of vi / etc/sysctl.conf file

​ vm.max_map_count=655360

Switch to root permission

​ sysctl-p

​ iii. Java.nio.file.AccessDeniedException: … / elasticsearch-6.2.2/config/jvm.options

Chown user name elasticsearch-6.2.2 installation directory path-R

You can first install elasticsearch-head to monitor the elasticsearch cluster environment

A) tar-zxvf elasticsearch-head-master

B) npm install

C) npm run start

Configure the slave node server

Cluster.name: es-app # cluster name, which can be modified by yourself

Node.name: es-2 # node name, modify it by yourself

Network.host: 192.168.235.132 # host address, write native IP here

Http.port: 9200 # port

Discovery.zen.ping.unicast.hosts: ["192.168.235.133"] # set up the command of the cluster

Similarly configure the third node

Start installing LogStash

The nodejs file is written by c and needs to be yum install gcc gcc-c++ first.

Then compile the nodejs file directly with make

Tags: Name file node cluster user host address end directory port problem native switch configuration data maximum number of pieces memory distributed reason Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Information MySQL Xiaomi Huawei