centos安装elasticsearch7.9

news2024/9/23 15:22:09

安装es

  • 下载elasticsearch安装包
  • 解压安装包,并修改配置文件
    • 解压
    • 进入目录
    • 修改配置文件
  • 添加用户,并修改所有者
  • 切换用户,运行es
  • 如何迁移旧版本的数据

下载elasticsearch安装包

下载地址如下,版本号可以替换成自己想要的。

这里需要注意一点,需要根据你服务器的内核来进行选择,如下图所示,我就应该选择aarch64版本的,否则运行的时候会报错cannot execute binary file: Exec format error
在这里插入图片描述

https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.3-linux-aarch64.tar.gz
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.3-linux-x86_64.tar.gz

解压安装包,并修改配置文件

解压

tar -zxvf elasticsearch-7.9.3-linux-aarch64.tar.gz

进入目录

cd elasticsearch-7.9.3

修改配置文件

vi config/elasticsearch.yml

有以下几点需要修改

  1. 放开node.name这个注释
  2. 放开path.data、path.log注释,并修改成你想要存放的位置
  3. 修改network.host为0.0.0.0让其可以被IP访问
  4. 修改cluster.initial_master_nodes 值为第一步配置的名字

下面是修改后的配置文件内容:

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /home/alllinks/elasticsearch-7.9.3/data
#
# Path to log files:
#
path.logs: /home/alllinks/elasticsearch-7.9.3/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
http.port: 9205
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["node-1"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

添加用户,并修改所有者

elasticsearch需要非root用户运行,所以需要添加用户并修改elastielcsearch-7.9.3的所有者,命令如下
useradd es
chown es:es -R elastielcsearch-7.9.3

切换用户,运行es

su es
cd /elastielcsearch-7.9.3/bin
./elasticsearch -d

如何迁移旧版本的数据

如果有旧版本的数据的话可以将旧版本的数据直接cp到data目录下就好,但是需要注意版本,具体可以访问http://es服务器ip:9200。查看返回值minimum_wire_compatibility_version、minimum_index_compatibility_version

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/890760.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

讯飞星火、文心一言和通义千问同时编“贪吃蛇”游戏,谁会胜出?

同时向讯飞星火、文心一言和通义千问三个国产AI模型提个相同的问题: “python 写一个贪吃蛇的游戏代码” 看哪一家AI写的程序直接能用,谁就胜出! 讯飞星火 讯飞星火给出的代码: import pygame import sys import random# 初…

上海亚商投顾盘:沪指震荡反弹 机器人概念股掀涨停潮

上海亚商投顾前言:无惧大盘涨跌,解密龙虎榜资金,跟踪一线游资和机构资金动向,识别短期热点和强势个股。 市场情绪 三大指数今日震荡反弹,科创50盘中涨超1%。机器人概念股掀涨停潮,通力科技、昊志机电、哈焊…

java接口导出csv

1、背景介绍 项目中需要导出数据质检结果,本来使用Excel,但是质检结果数据行数过多,导致用hutool报错,因此转为导出csv格式数据。 2、参考文档 https://blog.csdn.net/ityqing/article/details/127879556 工程环境:…

Spring Clould 网关 - Gateway

视频地址:微服务(SpringCloudRabbitMQDockerRedis搜索分布式) Gateway网关-网关作用介绍(P35) Spring Cloud Gateway 是 Spring Cloud 的一个全新项目,该项目是基于 Spring 5.0,Spring Boot 2…

The coming up production issues

Introduction Ladies and gentlemen, give it up for the wonderful world of software production ! Now, I know that what youre thinking. "Software production!?" That sounds exciting, well, let me tell you, its a rollercoaster(过山车、剧烈起伏的事物…

【第六讲---非线性优化】

优化与优化库 优化问题 👉优化问题组成 优化对象目标函数/损失函数/评价函数约束条件 👉分类 可以分为凸优化和非凸优化 什么是凸优化呢? 目标函数是凸的(有单一极值点称为是凸的)不等式约束是凸的所在的空间是凸…

容器和云原生(二):Docker容器化技术

目录 Docker容器的使用 Docker容器关键技术 Namespace Cgroups UnionFS Docker容器的使用 首先直观地了解docker如何安装使用,并快速启动mysql服务的,启动时候绑定主机上的3306端口,查找mysql容器的ip,使用mysql -h contain…

【脚踢数据结构】图(纯享版)

(꒪ꇴ꒪ ),Hello我是祐言QAQ我的博客主页:C/C语言,Linux基础,ARM开发板,软件配置等领域博主🌍快上🚘,一起学习,让我们成为一个强大的攻城狮!送给自己和读者的…

Pytest和Unittest测试框架的区别?

如何区分这两者,很简单unittest作为官方的测试框架,在测试方面更加基础,并且可以再次基础上进行二次开发,同时在用法上格式会更加复杂;而pytest框架作为第三方框架,方便的地方就在于使用更加灵活&#xff0…

Python Django 模型概述与应用

今天来为大家介绍 Django 框架的模型部分,模型是真实数据的简单明确的描述,它包含了储存的数据所必要的字段和行为,Django 遵循 DRY Principle 。它的目标是你只需要定义数据模型,然后其它的杂七杂八代码你都不用关心,…

龙迅LT9711 2PORT MIPI或者LVDS转TYPE-C

LT9711 1.描述: Lontium LT9711是双端口MIPI/LVDS到DP1.2转换器,内部有c型替代模式开关和PD控制器。MIPI DSI/CSI输入具有可配置的单端口或双端口,具有1个时钟通道,1个~4个数据通道,最大运行2Gbps/通道,可…

2023 年值得关注的 8 个最佳免费开发者工具

开发者工具对开发人员的重要性不言而喻,保持最新工具的更新可以显著提高你的工作效率并简化您的工作流程。随着技术的快速发展,新的开发工具不断被引入市场。今天,我们将分享 2023 年你值得关注的最新开发者工具。 1.Plaky Plaky 是一种基于…

JVM——JDK 监控和故障处理工具总结

文章目录 JDK 命令行工具jps:查看所有 Java 进程jstat: 监视虚拟机各种运行状态信息 jinfo: 实时地查看和调整虚拟机各项参数jmap:生成堆转储快照**jhat**: 分析 heapdump 文件**jstack** :生成虚拟机当前时刻的线程快照 JDK 可视化分析工具JConsole:Java 监视与管理控制台连接…

司徒理财:8.17黄金反弹遇阻,1900现价空!

黄金趋势下跌,现在反弹遇阻,继续空!除非行情强势站上1907位置,否则还是空头下跌走势,反弹遇阻直接空!      黄金从走势上看,一直阴跌,并且在昨日加速下行!现在黄金受…

ubuntu18.04从0到1在ros上跑yolo5

ubuntu篇---ubuntu20.04安装cuda和cudnn_ubuntu安装cudann_心惠天意的博客-CSDN博客操作系统环境:Ubuntu 20.041. 安装N卡驱动首先我们需要添加源,sudo add-apt-repository ppa:graphics-drivers/ppasudo apt update然后检查可以安装的驱动版本&#xff…

华为将收取蜂窝物联网专利费,或将影响LPWAN市场发展

近日,华为正式公布了其4G和5G手机、Wi-Fi6设备和物联网产品的专利许可费率,其中包含了长距离通信技术蜂窝物联网。作为蜂窝物联网技术的先驱,华为是LTE Category NB (NB-IoT)、LTE Category M和其他4G物联网标准的主要贡献者。 在NB-IoT领域…

『论文精读』Data-efficient image Transformers(DeiT)论文解读

『论文精读』Data-efficient image Transformers(DeiT)论文解读 文章目录 一. DeiT简介二. 知识蒸馏(knowledge distillation)2.1. KLDivloss2.2. 蒸馏温度 τ \tau τ2.3. distillation in transformer 三. better hyperparameter四. data augmentation五. label smoothing参…

随机微分方程

应用随机过程|第7章 随机微分方程 见知乎:https://zhuanlan.zhihu.com/p/348366892?utm_sourceqq&utm_mediumsocial&utm_oi1315073218793488384

2023年4大收银系统软件排名(真实测评)

现在满大街的各种服装店、便利店、百货店、母婴店...... 每天都要处理大量的订单。 使用传统的人工开单记账,效率低下、客户体验差、而且容易出错,需要耗费很多时间来回对账; 聪明的零售店老板都已经开始使用收银系统软件,通过手…

线程同步条件变量

为何要线程同步 在线程互斥中外面解决了多线程访问共享资源所会造成的问题。 这篇文章主要是解决当多线程互斥后引发的新的问题:线程饥饿的问题。 什么是线程饥饿?互斥导致了多线程对临界区访问只能改变为串行,这样访问临界资源的代码只能…