广告
返回顶部
首页 > 资讯 > 精选 >elasticsearch6.7.1集群搭建步骤
  • 145
分享到

elasticsearch6.7.1集群搭建步骤

2023-06-02 15:06:29 145人浏览 泡泡鱼
摘要

本篇内容主要讲解“elasticsearch6.7.1集群搭建步骤”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“elasticsearch6.7.1集群搭建步骤”吧!elasticsearch下

本篇内容主要讲解“elasticsearch6.7.1集群搭建步骤”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“elasticsearch6.7.1集群搭建步骤”吧!

elasticsearch下载地址:ttps://GitHub.com/elastic/elasticsearch/releases

ik下载地址:https://github.com/medcl/elasticsearch-analysis-ik/releases

下载解压es和jdk

[root@node1 ~]# wget Https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.1.tar.gz

[root@node1 ~]# tar xvf elasticsearch-6.7.1.tar.gz -C /opt/

[root@node1 ~]# wget https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-linux-x64.rpm?AuthParam=1552723272_02cde009ff2384cfcf01e2c377d085cc

[root@node1 ~]# scp jdk-8u202-linux-x64.rpm  node2:/root/    --将jdk传到各节点上

[root@node1 ~]# scp jdk-8u202-linux-x64.rpm  node3:/root/    --将jdk传到各节点上

[root@node1 ~]# rpm -ivh jdk-8u202-linux-x64.rpm             --在各节点安装jdk

[root@node1 ~]# cd /opt/elasticsearch-6.7.1/

[root@node1 elasticsearch-6.7.1]# useradd wuhan     --创建es用户,es不能用root用户启动

[root@node1 elasticsearch-6.7.1]# passwd wuhan

更改用户 wuhan 的密码 。

新的 密码:

无效的密码: 密码少于 8 个字符

重新输入新的 密码:

passwd:所有的身份验证令牌已经成功更新。

[root@node1 elasticsearch-6.7.1]# chown -R wuhan:wuhan /opt/elasticsearch-6.7.1/

[root@node1 elasticsearch-6.7.1]# vim /etc/security/limits.conf 

*      soft    nofile    65535

*      hard    nofile    65535

[root@node1 elasticsearch-6.7.1]# vim /etc/sysctl.conf 

vm.max_map_count=262144

[root@node1 elasticsearch-6.7.1]# sysctl -p

[root@node1 elasticsearch-6.7.1]# vim /opt/elasticsearch-6.7.1/config/elasticsearch.yml

cluster.name: wuhan     --设置集群节点名

node.name: node-1       --为每台机器设置node名字,各节点名字不能一样

path.data: /opt/elasticsearch-6.7.1/data    --es数据目录

path.logs: /opt/elasticsearch-6.7.1/logs    --日志目录

discovery.zen.ping.unicast.hosts: ["node1", "node2", "node3", "node4"]

network.host: 172.16.8.23    --绑定本机的IP地址

http.port: 9200              --指定端口

[root@node1 elasticsearch-6.7.1]#

将node1的es文件复制到其它节点(与node1配置一样)

[root@node1 opt]# scp -r elasticsearch-6.7.1 node2:/opt/

[root@node1 opt]# scp -r elasticsearch-6.7.1 node3:/opt/

[root@node2 ~]# chown -R wuhan:wuhan /opt/elasticsearch-6.7.1/

[root@node2 ~]# vim /etc/security/limits.conf 

*      soft    nofile    65535

*      hard    nofile    65535

[root@node2 ~]# vim /etc/sysctl.conf

vm.max_map_count=262144

[root@node2 ~]# sysctl -p

启动各节点的es服务

[root@node1 ~]# su - wuhan 

[wuhan@node1 ~]$ cd /opt/elasticsearch-6.7.1/bin/

[wuhan@node1 bin]$ ./elasticsearch -d

[wuhan@node1 bin]# curl http://172.16.8.23:9200

{

  "name" : "node-1",

  "cluster_name" : "wuhan",

  "cluster_uuid" : "_na_",

  "version" : {

    "number" : "6.7.1",

    "build_flavor" : "default",

    "build_type" : "tar",

    "build_hash" : "2f32220",

    "build_date" : "2019-04-02T15:59:27.961366Z",

    "build_snapshot" : false,

    "lucene_version" : "7.7.0",

    "minimum_wire_compatibility_version" : "5.6.0",

    "minimum_index_compatibility_version" : "5.0.0"

  },

  "tagline" : "You Know, for Search"

}

[wuhan@node1 bin]# 

安装head插件

[root@node1 ~]$ wget https://nodejs.org/dist/v11.13.0/node-v11.13.0-linux-x64.tar.xz

[root@node1 ~]$ tar xvf node-v11.13.0-linux-x64.tar.xz 

[root@node1 ~]$ mv node-v11.13.0-linux-x64 /opt/node-v11.13.0

[root@node1 ~]$ vim /etc/profile

export PATH=$PATH:/opt/node-v11.13.0/bin

[root@node1 ~]$ git clone git://github.com/mobz/elasticsearch-head.git

[root@node1 ~]# cd elasticsearch-head/

[root@node1 elasticsearch-head]# npm  install

npm WARN elasticsearch-head@0.0.0 license should be a valid SPDX license expression

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platfORM for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 9 packages from 13 contributors and audited 1853 packages in 157.775s

found 33 vulnerabilities (19 low, 8 moderate, 6 high)

  run `npm audit fix` to fix them, or `npm audit` for details

[root@node1 elasticsearch-head]# npm run start

> elasticsearch-head@0.0.0 start /root/elasticsearch-head

> grunt server

Running "connect:server" (connect) task

Waiting forever...

Started connect WEB server on http://localhost:9100

修改es配置文件,重启服务

[wuhan@node1 bin]# vim /opt/elasticsearch-6.7.1/config/elasticsearch.yml 

http.cors.enabled: true 

http.cors.allow-origin: "*"

[wuhan@node1 bin]$ jps

17849 Elasticsearch

17935 Jps

[wuhan@node1 bin]$ kill -9 17849

[wuhan@node1 bin]$ cd /opt/elasticsearch-6.7.1/bin

[wuhan@node1 bin]$ ./elasticsearch -d

访问web页面

[root@node1 elasticsearch-head]# grunt server &

[1] 20212

[root@node1 elasticsearch-head]# 

elasticsearch6.7.1集群搭建步骤

错误提示:

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR!     /root/.npm/_logs/2019-04-09T11_24_27_132Z-debug.log

解决方法:

[root@node1 elasticsearch-head]# npm install phantomjs-prebuilt@2.1.16 --ignore-scripts

npm notice created a lockfile as package-lock.JSON. You should commit this file.

npm WARN elasticsearch-head@0.0.0 license should be a valid SPDX license expression

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ phantomjs-prebuilt@2.1.16

added 62 packages from 64 contributors, removed 4 packages and audited 1717 packages in 20.487s

found 31 vulnerabilities (18 low, 7 moderate, 6 high)

  run `npm audit fix` to fix them, or `npm audit` for details

[root@node1 elasticsearch-head]#

错误提示:

[2019-04-10T14:42:30,931][ERROR][o.e.b.Bootstrap          ] [node-1] Exception

java.lang.IllegalArgumentException: Plugin [analysis-ik] was built for Elasticsearch version 6.7.0 but version 6.7.1 is running

        at org.elasticsearch.plugins.PluginsService.verifyCompatibility(PluginsService.java:346) ~[elasticsearch-6.7.1.jar:6.7.1]

        at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:531) ~[elasticsearch-6.7.1.jar:6.7.1]

        at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:471) ~[elasticsearch-6.7.1.jar:6.7.1]

        at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:163) ~[elasticsearch-6.7.1.jar:6.7.1]

        at org.elasticsearch.node.Node.<init>(Node.java:339) ~[elasticsearch-6.7.1.jar:6.7.1]

        at org.elasticsearch.node.Node.<init>(Node.java:266) ~[elasticsearch-6.7.1.jar:6.7.1]

解决方法:

ES和ik版本必须一至,否则会出错

到此,相信大家对“elasticsearch6.7.1集群搭建步骤”有了更深的了解,不妨来实际操作一番吧!这里是编程网网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

--结束END--

本文标题: elasticsearch6.7.1集群搭建步骤

本文链接: https://www.lsjlt.com/news/230507.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • elasticsearch6.7.1集群搭建步骤
    本篇内容主要讲解“elasticsearch6.7.1集群搭建步骤”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“elasticsearch6.7.1集群搭建步骤”吧!elasticsearch下...
    99+
    2023-06-02
  • MySQL5.7集群搭建步骤
    这篇文章主要讲解了“MySQL5.7集群搭建步骤”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“MySQL5.7集群搭建步骤”吧! ...
    99+
    2022-10-18
  • windowsserver2008群集搭建图文步骤
    群集是指一组相互连接、相互依赖的计算机系统或服务,它们可以作为一个整体来提供某种功能或服务。这些计算机系统或服务可以根据特定的需求配置和管理,并使用负载均衡和自动化工具来确保高可用性...
    99+
    2023-05-18
    2008群集
  • kafka-2.11集群的搭建步骤
    这篇文章主要介绍“kafka-2.11集群的搭建步骤”,在日常操作中,相信很多人在kafka-2.11集群的搭建步骤问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”kafka-...
    99+
    2022-10-18
  • MySQL MGR集群搭建的步骤
    本篇内容介绍了“MySQL MGR集群搭建的步骤”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!1.背景My...
    99+
    2022-10-18
  • 搭建配置redis集群的步骤
    这期内容当中的小编将会给大家带来有关搭建配置redis集群的步骤,以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。Redis集群至少需要3个节点,因为投票容错机制要求超过半数节点认为某个节...
    99+
    2022-10-18
  • rocketmq集群搭建的步骤是什么
    搭建RocketMQ集群的步骤如下: 下载和安装RocketMQ:从Apache RocketMQ的官方网站下载RocketMQ...
    99+
    2023-10-27
    rocketmq
  • mongodb集群搭建的步骤是什么
    搭建MongoDB集群的步骤如下: 安装MongoDB:在每个节点上安装MongoDB并确保其正常运行。 配置MongoDB...
    99+
    2023-10-26
    mongodb
  • docker搭建Zookeeper集群的方法步骤
    目录0.前言1.前提2.开始搭建解释创建zoo.cfg3.docker搭建1.docker创建网络2.启动第1个zk节点3.启动第2个zk节点4.启动第3个zk节点4.访问节点1.进...
    99+
    2022-11-13
  • Docker搭建RabbitMQ集群的方法步骤
    目录集群模式介绍1、普通集群的搭建1.1、普通集群架构介绍1.2、环境准备1.3、集群搭建2、镜像集群的搭建2.1、配置镜像集群的策略集群模式介绍 RabbitMQ集群模式有两种:普...
    99+
    2022-11-12
  • docker集群搭建的步骤是什么
    搭建Docker集群的步骤如下:1. 安装Docker:在每个节点上安装Docker引擎,可以根据不同的操作系统选择合适的安装方式进...
    99+
    2023-08-23
    docker
  • windows server 2008 群集搭建图文步骤
    以下是Windows Server 2008群集搭建的图文步骤:1. 安装操作系统:- 在每台服务器上安装Windows Serve...
    99+
    2023-08-11
    Windows
  • Hadoop集群搭建的步骤是什么
    搭建Hadoop集群的步骤如下:1. 准备环境:确保所有节点都安装了Java,并且网络可访问。2. 下载Hadoop:从Apache...
    99+
    2023-09-06
    Hadoop
  • MySQL之PXC集群搭建的方法步骤
    目录一、PXC 介绍1.1 PXC 简介1.2 PXC特性和优点1.3 PXC的局限和劣势1.4 PXC与Replication的区别二、实践2.1 搭建 PXC 集群2.2 集群同步验证2.3 新增数据库节点操作2...
    99+
    2022-05-12
    MySQL PXC集群搭建 MySQL PXC集群
  • Redis的Cluster集群搭建的实现步骤
    目录一、引言二、Redis的Cluster模式介绍1、Redis群集101 2、Redis群集TCP端口 3、Redis集群和Docker 4、Redis集群数据分片 5、Redis...
    99+
    2022-11-12
  • Windows下搭建Redis集群的方法步骤
    目录Redis集群:在Windows系统下搭建Redis集群:1.下载并安装Redis2.下载并安装ruby3.创建Redis集群Redis集群: 如果部署到多台电脑,就跟普通的集群...
    99+
    2022-11-13
  • redis搭建哨兵集群的实现步骤
    目录redis安装部署redis集群架构配置redis主从测试主从搭建redis哨兵集群哨兵集群详解:哨兵集群原理哨兵集群redis安装部署 环境说明: redis使用的是6.2.6...
    99+
    2022-11-13
  • docker实现redis集群搭建的方法步骤
    目录一、创建redis docker基础镜像 二、制作redis节点镜像 三、运行redis集群  引用:摘要:接触docker以来,似乎养成了一种习惯,安装什么应用软件都...
    99+
    2022-11-12
  • Docker Swarms跨主机集群搭建的具体步骤
    这篇文章主要介绍“Docker Swarms跨主机集群搭建的具体步骤”,在日常操作中,相信很多人在Docker Swarms跨主机集群搭建的具体步骤问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Docker ...
    99+
    2023-06-04
  • Docker-swarm快速搭建redis集群的方法步骤
    目录环境配置修改hostname创建目录创建网络编写compose.yml模版文件启动服务验证测试集群集群测试验证环境配置 1.三台虚拟机,VM16 操作系统IP备注centos71...
    99+
    2022-11-13
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作