CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3

这篇具有很好参考价值的文章主要介绍了CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

一、官网下载elasticsearch-8.5.3和kibana-8.5.3 linux下的安装包

注意:安装前要确定系统安装了JDK8环境

官网下载地址:https://www.elastic.co/cn/downloads/?elektra=home&storm=hero

CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3,中间件,elasticsearch,Powered by 金山文档
CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3,中间件,elasticsearch,Powered by 金山文档

二、安装elasticseatch

2.1 将压下载的压缩包上传到linux系统的 /opt 目录下
CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3,中间件,elasticsearch,Powered by 金山文档
2.2 在 /opt 目录下创建soft目录并解压 elasticsearch

下面我将 elasticsearch 简称为 es 哈

#创建soft目录
mkdir soft

#解压elasticsearch-8.5.3-linux-x86_64.tar.gz
tar -zxvf elasticsearch-8.5.3-linux-x86_64.tar.gz

#解压的es目录移动到 soft 目录下
mv elasticsearch-8.5.3  soft/
2.3 在es目录下创建 数据目录 data 和日志目录 logs
#切换到es目录下
cd /opt/soft/elasticsearch-8.5.3

#新建data和logs目录
mkdir data
mkdir logs
2.4 因为es不允许用root用户启动,所以创建用户es
#创建用户组与用户
groupadd es
useradd es -g es -p es

#给es目录授权
chown -R es:es /opt/soft/elasticsearch-8.5.3/
2.5 修改用户资源限制
vim /etc/security/limits.conf

添加以下内容

* hard nofile 65536
* soft nofile 131072
* hard nproc 4096
* soft nproc 4096
2.6 修改系统配置
vim /etc/sysctl.conf

添加

fs.file-max=655360
vm.max_map_count=655360
2.7 使以上修改生效
/sbin/sysctl -p
2.8 修改 config/elasticsearch.yml 文件

配置如下

我虚拟机中三个centos系统IP是:192.168.29.188 , 192.168.29.189 , 192.168.29.190;你们根据自己系统IP修改哈

#集群名称
cluster.name: my-app
#节点名称
node.name: node-1
#节点角色
node.roles: [master,data]
path.data: /opt/soft/elasticsearch-8.5.3/data
path.logs: /opt/soft/elasticsearch-8.5.3/logs
#绑定的IP
network.host: 192.168.29.188
#暴露的http端口
http.port: 9200
#使用head等插件监控集群信息,需要打开以下配置项
http.cors.allow-origin: "*"
http.cors.enabled: true
http.max_content_length: 200mb
#集群成员
discovery.seed_hosts: ["192.168.29.188:9300","192.168.29.189:9300","192.168.29.190:9300"]
cluster.initial_master_nodes: ["node-1"]

# 注意这里改成false
xpack.security.enabled: false

xpack.security.enrollment.enabled: true

# 注意这里改成false
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

# 注意这里改成false
xpack.security.transport.ssl:
  enabled: false
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12

完整配置如下

# ======================== 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-app
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-1
node.roles: [master,data]
#
# 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: /opt/soft/elasticsearch-8.5.3/data
#
# Path to log files:
#
path.logs: /opt/soft/elasticsearch-8.5.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 -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: 192.168.29.188
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200

http.cors.allow-origin: "*"
http.cors.enabled: true
http.max_content_length: 200mb
#
# 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: ["192.168.29.188:9300","192.168.29.189:9300","192.168.29.190:9300"]
#
# 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.
#
# --------------------------------- Readiness ----------------------------------
#
# Enable an unauthenticated TCP readiness endpoint on localhost
#
#readiness.port: 9399
#
# ---------------------------------- Various -----------------------------------
#
# Allow wildcard deletion of indices:
#
#action.destructive_requires_name: false

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically      
# generated to configure Elasticsearch security features on 12-01-2023 02:34:39
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: false

xpack.security.enrollment.enabled: true
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: false
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
#----------------------- END SECURITY AUTO CONFIGURATION ------------------------
2.9 修改es目录下config目录下的jvm.options 文件
-Xms512m
-Xmx512m
CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3,中间件,elasticsearch,Powered by 金山文档
2.10 启动es

切换到es用户

su es

进入es目录下bin目录下执行指令

./elasticsearch -d

浏览器访问 IP:9200

CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3,中间件,elasticsearch,Powered by 金山文档

访问成功

2.11 关闭es
ps -ef | grep elasticsearch
CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3,中间件,elasticsearch,Powered by 金山文档
kill -9 1823

三、搭建另外两个es节点

3.1将centos系统一下es目录复制到centos系统二和三

scp -r  /opt/soft/elasticsearch-8.5.3 root@192.168.29.189:/opt/soft/elasticsearch-8.5.3

scp -r  /opt/soft/elasticsearch-8.5.3 root@192.168.29.190:/opt/soft/elasticsearch-8.5.3
3.2 在centos系统二和三重复2.4 2.5 2.6 2.7 步骤
3.3 修改centos系统二和三的config/elasticsearch.yml 文件

只需修改以下部分

node.name: node-2
network.host: 192.168.29.189

节点三亦是如此

node.name: node-3
network.host: 192.168.29.190
3.4 查看集群节点数

启动系统二三的es

浏览输入(换成你的IP):http://192.168.29.188:9200/_cat/nodes

CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3,中间件,elasticsearch,Powered by 金山文档

浏览器显示三个节点

四、安装Kibana-8.5.3

4.1 安装kibana

解压压缩包

tar -zxvf kibana-8.5.3-linux-x86_64.tar.gz

移动到 /opt/soft 目录下

mv kibana-8.5.3  soft/

授权

chown -R es:es kibana-8.5.3/

切换到es用户

su es

修改 kibana-8.5.3 目录下 config 目录下 kibana.yml 文件

server.port: 5601

server.host: "192.168.29.188"

elasticsearch.hosts: ["http://192.168.29.188:9200","http://192.168.29.189:9200","http://192.168.29.190:9200"]

i18n.locale: "zh-CN"

进入kibana目录,启动kibana

nohup ./bin/kibana > kibana.log 2>&1 &
CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3,中间件,elasticsearch,Powered by 金山文档

浏览器输入:http://192.168.29.188:5601/

CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3,中间件,elasticsearch,Powered by 金山文档

看到如上界面,即安装启动成功文章来源地址https://www.toymoban.com/news/detail-661290.html

4.2 杀死kibana进程
netstat -tunlp | grep 5601
CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3,中间件,elasticsearch,Powered by 金山文档
#1953是进程号  看上截图
kill -9 1953

到了这里,关于CentOS7安装elasticsearch-8.5.3集群、kibana-8.5.3的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Centos7安装Elasticsearch6.4.3和Kibana6.4.3

    一、下载好安装文件上传到/usr/local 二、安装Java环境 1)、解压jdk 2)、 配置Java环境变量 3)、profile末尾添加 4)、刷新配置文件 5)、检查是否安装成功 三、安装Elasticsearch 1)、解压安装包 2)、修改启动时默认Jvm参数,默认是1G,根据自己需求自行修改 我虚拟机内存不够改

    2023年04月22日
    浏览(35)
  • 使用Docker安装ELK(Elasticsearch+Logstash+Kibana)+filebeat____基于CentOS7.9

    目录 一、安装JDK 二、部署Elasticsearch 三、部署kibana 四、部署Logstash 五、部署filebeat 六、filebeat采集数据,logstash过滤,在kibana中显示 七、kibana增加索引 1、更新系统 2、安装Java 下面是安装OpenJDK的命令: 3、验证安装 1、查看是否安装docker 安装最新版的docker可能导致部分系统不

    2024年02月04日
    浏览(38)
  • 最新Elasticsearch8.4.3 + Kibana8.4.3在云服务器Centos7.9安装部署(参考官方文档)

      最近笔者学习Elasticsearch,官方最新稳定版为 Elasticsearch-8.4.3,想在云服务器上Centos7.9搭建。搭建之路坑多路少啊(指网上的博文教程五花八门,基本都是ES7版本居多,ES8有少数,各种配置参数一头雾水,细节不多说,照搬了踩坑跌得头破血流),对小菜的我来说,简直要

    2024年02月02日
    浏览(49)
  • CentOS7下安装ElasticSearch7.6.1详细教程(单机、集群搭建)

    CentOS 7下安装ElasticSearch7.6.1详细教程 ElasticSearch客户端Kibana7.6.1安装教程 ElasticSearch分词器IK安装教程 Elasticsearch-head插件安装教程 想要学习ElasticSearch技术,需要在服务器搭建ElasticSearch环境。 CenOS:7; JDK:1.8; Elasticsearch:7.6.1; ES不能使用root用户来启动,必须使用普通用户来

    2023年04月09日
    浏览(41)
  • CentOS7搭建Elasticsearch与Kibana服务

    因为我们还需要部署kibana容器,因此需要让es和kibana容器互联。这里先创建一个网络:  运行docker命令,部署单点es: 命令解释: -e \\\"cluster.name=es-docker-cluster\\\" :设置集群名称 -e \\\"http.host=0.0.0.0\\\" :监听的地址,可以外网访问 -e \\\"ES_JAVA_OPTS=-Xms512m -Xmx512m\\\" :内存大小 -e \\\"discovery.ty

    2024年02月03日
    浏览(33)
  • Elasticsearch-7.8.0安装最全(mac、Linux、window、centos7.5集群、docker)

    第一章 Elasticsearch-7.8.0单机安装 第二章 Elasticsearch-7.8.0集群基于Centos7 第三章 Elasticsearch-7.8.0通过Docker方式安装 Elasticsearch安装单机、Kibana安装单机 适用于mac、window、linux单机测试 1.1.1 安装包下载 下载地址:https://www.elastic.co/downloads/past-releases#elasticsearch 1.1.2 解压安装ElasticSea

    2024年04月09日
    浏览(30)
  • centos7 搭建ELK(elasticsearch、logstash、kibana)

    1、下载安装包 使用华为镜像站下载速度很快,华为镜像站: https://mirrors.huaweicloud.com/home ,下载时需要保证版本一致 2、安装elasticsearch 解压到当前目录 安装,将Elasticsearch移动到/opt目录之中 创建Elasticsearch用户 es 规定 root 用户不能启动 es,所以需要新建一个其他用户来启动

    2024年02月13日
    浏览(28)
  • 中间件: ElasticSearch的安装与部署

    文档地址: https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html 创建用户: 系统参数配置: 方式一:YUM安装 方式二: 配置 启动 (1)修改配置elasticsearch.yml: cluster.name # 一个集群内cluster name 需要相同 node.name # 各个节点node name 唯一 discovery.seed_hosts # network.host node.mast

    2024年02月12日
    浏览(32)
  • Elasticsearch 8.3集群部署(centos7)实战

    【提示】elasticsearch7以上的版本压缩包内自带JDK 本地安装 下载elasticsearch 的rpm包,然后 使用 rpm -ivh elasticsearch #这个命令安装,名字不全# systemctl daemon-reload # 重新加载某个服务的配置文件,如果新安装了一个服务,归属于 systemctl 管理,要是新服务的服务程序配置文件生效,

    2023年04月15日
    浏览(38)
  • Centos7快速安装Kibana并连接ES使用

    Elasticsearch 提供了一个名为 Kibana 的官方可视化界面。Kibana 是一个开源的数据可视化和管理工具,用于 Elasticsearch。它提供了丰富的功能,如仪表板、图表、地图等,帮助您更好地理解、搜索和可视化存储在 Elasticsearch 中的数据。 创建 Kibana 的存储库文件 /etc/yum.repos.d/kibana.r

    2024年02月05日
    浏览(31)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包