Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Deployment of ES clusters (3 nodes) in centos7 environment

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

This document is aimed at the deployment of es on 3 nodes in centos7 environment. The 3-node ip is 172.16.10.102.172.16.10.103172.16.10.104 respectively.

First, add host

Add host configuration under each node

172.16.10.102 HadoopMaster

172.16.10.103 HadoopSlave1

172.16.10.104 HadoopSlave2

Second, then download the es installation package

Cd / opt wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.0.tar.gz

Third, extract the es installation package

Tar-zxvf elasticsearch-6.4.0.tar.gz

4. Edit the es configuration file (the master configuration is as follows, and the other two slave can modify the node.master:false)

Vim config/elasticsearch.yml

Network.host: 0.0.0.0

Discovery.zen.ping_timeout: 120s

Client.transport.ping_timeout: 60s

Discovery.zen.ping.unicast.hosts: ["172.16.10.102", "172.16.10.103", "172.16.10.104"]

Cluster.name: escluster

Node.name: HadoopMaster

Path.data: / opt/elasticsearch-6.4.0/data

Path.logs: / opt/elasticsearch-6.4.0/datalog

Node.master: true

Node.data: true

Node.attr.rack: r1

Bootstrap.memory_lock: true

Bootstrap.system_call_filter: false

Http.port: 9200

Http.cors.enabled: true

Http.cors.allow-origin: "*"

Fifth, modify the system parameters

Vim / etc/security/limits.conf

Add

Soft nofile 65536hard nofile 65536soft nproc 65536hard nproc 65536soft memlock unlimitedhard memlock unlimited

Vim / etc/sysctl.conf

Add

Vm.max_map_count=655360

Then reload the system parameters

Sysctl-p

6. Start with es user

Groupadd es

Useradd es- g es-p elasticsearch-6.4.0

Chown-R es:es elasticsearch-6.4.0

Su es

. / elasticsearch-d

7. Install head

Git clone git://github.com/mobz/elasticsearch-head.git under a random folder

Install the nodejs environment

Yum-y install nodejs

Cd elasticsearch-head/

Npm install

Npm install-g grunt-cli

Grunt server &

Open http://localhost:9100

(if prompted to report an error phantomjs-prebuilt@2.1.16 install: node install.js)

Npm install phantomjs-prebuilt@2.1.16-ignore-scripts is fine.

Restart the es program.

Open the web page: http://172.16.10.102:9100 (if 9200 of the head cannot be connected, check the http.cors.enabled: true of the configuration file

Http.cors.allow-origin: whether "*" is configured)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report