Elasticsearch集群部署(Linux)

 1. 准备环境

这里准备三台Linux虚拟机,用于配置Elasticsearch集群和部署可视化工具Kibana。

角色IP域名集群名称节点名称版本操作系统
ES192.168.243.100linux100cluster-eses-node-1007.12.0CentOS 7
192.168.243.101linux101cluster-eses-node-101
192.168.243.102linux102cluster-eses-node-102
kibana192.168.243.100linux100

扩展:

(1)查看Elasticsearch对应的常用的jdk版本如下:(详情可看官网的支持一览表)

Elasticsearch and JVM

Oracle/OpenJDK**/AdoptOpenJDK 1.8.0Oracle/OpenJDK**
11
Oracle/OpenJDK**/Temurin
17
Elasticsearch 5.0.x-6.8.x
Elasticsearch 7.0.x-7.17.x
Elasticsearch 8.0.x-8.13.x
(2)JDK1.8在Linux服务器上的安装步骤如下:  JDK部署(Linux)https://blog.csdn.net/qq_39512532/article/details/135133353

2. Elasticsearch软件安装

2.1 软件下载

Elasticsearch软件官网下载地址:https://www.elastic.co/cn/downloads/past-releases#elasticsearch


2.2 上传服务器并解压缩

(1)将 elasticsearch-7.12.0-linux-x86_64.tar.gz压缩包上传到Linux服务器的自定义路径 /opt/software 下

(2)解压缩Elasticsearch压缩包到 自定义路径 /opt/module下:

[root@linux100 software]# tar -zxvf elasticsearch-7.12.0-linux-x86_64.tar.gz -C /opt/module

解压后的Elasticsearch的目录结构如下:

目录含义
bin可执行脚本目录
config配置目录
jdk内置JDK目录
lib类库
logs日志目录
modules模块目录
plugins插入目录

(3)把解压的elasticsearch-7.8.0文件分发到其他服务器Linux101、linux102:

        这里有两种分发方式:

        1)通过scp命令安全拷贝

[root@linux100 software]# scp -r /opt/module/elasticsearch-7.12.0 root@192.168.243.101:/opt/module
elasticsearch-7.12.0                                   100%  312MB  40.8MB/s   00:07
[root@linux100 software]# scp -r /opt/module/elasticsearch-7.12.0 root@192.168.243.102:/opt/module
elasticsearch-7.12.0                                   100%  312MB  40.8MB/s   00:07

        2)通过个人的集群分发脚本操作,具体可参考如下链接:

https://blog.csdn.net/qq_39512532/article/details/135138861icon-default.png?t=N7T8http://xn--kbrp7bz27a27wrub8w2d

[root@linux100 software]# xsync /opt/module/elasticsearch-7.12.0 

注意:本文后面分发都用第二种xsync命令分发方式!!!!

2.3 创建用户

在每个节点中都创建新用户ES,并修改Elasticsearch文件拥有者。

# 新增es用户
[root@linux100 ~]# useradd es 
        
# 设置es用户密码
[root@linux100 ~]# passwd es          
更改用户 es 的密码 。
新的 密码:
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。

#修改文件夹所有者
[root@linux100 ~]# chown -R es:es /opt/module/elasticsearch-7.12.0  
[root@linux100 ~]# ll
总用量 4
drwxr-xr-x.  9  es     es      155 3月  18 2021 elasticsearch-7.12.0
drwxr-xr-x. 13 hadoop hadoop  218 12月  4 19:53 hadoop-3.1.3
drwxrwxr-x.  8 hadoop hadoop 4096 11月 21 16:11 jdk1.8.0_391

扩展:如果设置用户有问题时,可通过userdel命令删除用户

[root@linux100 ~]# userdel -r es

2.4 生成安全认证证书

(1)在第一台服务器节点es-node-100设置集群多节点通信密钥

[es@linux100 ~]# cd /opt/module/elasticsearch-7.12.0/

# 签发ca证书,过程中需按两次回车键 
[es@linux100 elasticsearch-7.12.0]# bin/elasticsearch-certutil ca 
 
# 用ca证书签发节点证书,过程中需按三次回车键 
[es@linux100 elasticsearch-7.12.0]# bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12 
 
# 将生成的两个证书文件移动到config/certs目录中
[es@linux100 elasticsearch-7.12.0]# mv elastic-stack-ca.p12 elastic-certificates.p12 config/certs 

(2)在第一台服务器节点es-node-100设置集群多节点HTTP证书

[es@linux100 ~]# cd /opt/module/elasticsearch-7.12.0/

# 签发Https证书
[es@linux100 elasticsearch-7.12.0]# bin/elasticsearch-certutil http

以下是执行签发Https证书时的操作:

......

If you choose not to generate a CSR, this tool will generate a new certificate
for you. That certificate will be signed by a CA under your control. This is a
quick and easy way to secure your cluster with TLS, but you will need to
configure all your clients to trust that custom CA.

Generate a CSR? [y/N]n
......

If you do not have an existing CA, one will be generated for you.

Use an existing CA? [y/N]y
......

# 指定证书路径

Please enter the full pathname to the Certificate Authority that you wish to
use for signing your new http certificate. This can be in PKCS#12 (.p12), JKS
(.jks) or PEM (.crt, .key, .pem) format.
CA Path: certs/elastic-stack-ca.p12

......

# 无需输入密码,直接回车

Reading a PKCS12 keystore requires a password.
It is possible for the keystore's password to be blank,
in which case you can simply press <ENTER> at the prompt
Password for elastic-stack-ca.p12:
......

# 设置证书失效时间

You may enter the validity period in years (e.g. 3Y), months (e.g. 18M), or days (e.g. 90D)

For how long should your certificate be valid? [5y] 30y
......

# 无需每个节点配置证书

However, if you do not have a common domain name, and you expect to add
additional nodes to your cluster in the future, then you should generate a
certificate per node so that you can more easily generate new certificates when
you provision new nodes.

Generate a certificate per node? [y/N]n
......

# 输出连接到第一个节点的所有主机名称

Enter all the hostnames that you need, one per line.
When you are done, press <ENTER> once more to move on to the next step.

linux100
linux101
linux102

You entered the following hostnames.

 - linux100
 - linux101
 - linux102


Is this correct [Y/n]y

......

# 输出连接到第一个节点的所有主机IP地址

If you do not have fixed IP addresses, or not wish to support direct IP access
to your cluster then you can just press <ENTER> to skip this step.

Enter all the IP addresses that you need, one per line.
When you are done, press <ENTER> once more to move on to the next step.

192.168.243.100
192.168.243.101
192.168.243.102

You entered the following IP addresses.

 - 192.168.243.100
 - 192.168.243.101
 - 192.168.243.102

Is this correct [Y/n]y

......

# 不改变证书选项配置

The generated certificate will have the following additional configuration
values. These values have been selected based on a combination of the
information you have provided above and secure defaults. You should not need to
change these values unless you have specific requirements.

Key Name: linux100
Subject DN: CN=linux100
Key Size: 2048

Do you wish to change any of these options? [y/N]n

......

# 不给证书加密,按键输入两次回车

Your private key(s) will be stored in a PKCS#12 keystore file named "http.p12".
This type of keystore is always password protected, but it is possible to use a
blank password.

If you wish to use a blank password, simply press <enter> at the prompt below.
Provide a password for the "http.p12" file:  [<ENTER> for none]

## Where should we save the generated files?

A number of files will be generated including your private key(s),
public certificate(s), and sample configuration options for Elastic Stack products.

These files will be included in a single zip archive.

What filename should be used for the output zip file? [/opt/module/elasticsearch-7.12.0/elasticsearch-ssl-http.zip]

Zip file written to /opt/module/elasticsearch-7.12.0/elasticsearch-ssl-http.zip

由上可知生成的https证书压缩包具体路径为 /opt/module/elasticsearch-7.12.0/elasticsearch-ssl-http.zip。

(3)解压刚刚生成的zip包

[es@linux100 elasticsearch-7.12.0]# unzip elasticsearch-ssl-http.zip 

(4)将解压后的证书文件移动到config/certs目录中

[es@linux100 elasticsearch-7.12.0]# mv elasticsearch/http.p12 kibana/elasticsearch-ca.pem config/certs

(5)由于elasticsearch.yml配置文件中用到/opt/module/elasticsearch-7.12.0/config/certs/路径下的证书,则需要分发文件到linux101、linux102

[es@linux100 elasticsearch-7.12.0]# xsync /opt/module/elasticsearch-7.12.0/config/certs/

2.5 修改配置文件

(1)修改主配置文件elasticsearch.yml,并分发文件到linux101、linux102

[root@linux100 ~]# vim /opt/module/elasticsearch-7.12.0/config/elasticsearch.yml

在配置文件中加入以下内容:

# 集群名称,一个 Elasticsearch 集群有一个唯一的名字标识,默认就是elasticsearch

cluster.name: cluster-es

# 节点名称,每个节点名称不能重复
node.name: es-node-100

# 数据和日志文件存储路径

path.data: /opt/module/elasticsearch-7.12.0/data

path.logs: /opt/module/elasticsearch-7.12.0/logs

# 网络绑定地址,监听的IP地址 / 域名,每个节点地址不能重复
network.host: linux100

# HTTP接口端口,默认为9200
http.port: 9200

# 通信端口,节点间的沟通端口,默认为9300

transport.tcp.port: 9300

#是否有资格作为主节点

node.master: true

#是否是存储节点

node.data: true

# 节点发现,es7.x 之后新增的配置,数组放置集群中的所有节点
discovery.seed_hosts: ["linux100:9300", "linux101:9300", "linux102:9300"]

# 用于指定在多少个节点启动后,Elasticsearch 才会开始恢复已存储数据的过程,默认为1
gateway.recover_after_nodes: 2

# 是否启用 TCP 连接的保活机制,默认为true
network.tcp.keep_alive: true

#用于控制 Elasticsearch 节点之间的 TCP 连接是否启用了 Nagle 算法
network.tcp.no_delay: true

#用于指定是否启用传输层的 TCP 压缩,默认为false
transport.tcp.compress: true

#用于限制每个节点上本地存储的最大索引数量。当索引数量超过此限制时,Elasticsearch 将不再允许新的索引创建在该节点上.(默认值:1)

node.max_local_storage_nodes: 1


#es7.x 之后新增的配置,初始化一个新的集群时需要此配置来选举 master
cluster.initial_master_nodes: ["es-node-100", "es-node-101", "es-node-102"]

# head 插件需要这打开这两个配置

# 启用跨域资源共享 (CORS)

http.cors.enabled: true

# 指定允许跨域请求的所有来源

http.cors.allow-origin: "*"

http.max_content_length: 200mb

#集群内同时启动的数据任务个数,默认是 2 个
cluster.routing.allocation.cluster_concurrent_rebalance: 16
#添加或删除节点及负载均衡时并发恢复的线程个数,默认 4 个
cluster.routing.allocation.node_concurrent_recoveries: 16
#初始化数据恢复时,并发恢复线程的个数,默认 4 个
cluster.routing.allocation.node_initial_primaries_recoveries: 16

# ------------------------------------开启账号密码登录认证---------------------------------------------

# 启动X-Pack 安全功能
xpack.security.enabled: true

#启用HTTP层的安全性 (TLS),启用 HTTPS 支持
xpack.security.http.ssl.enabled: true

#设置密钥和证书路径
xpack.security.http.ssl.keystore.path: /opt/module/elasticsearch-7.12.0/config/certs/http.p12
xpack.security.http.ssl.truststore.path: /opt/module/elasticsearch-7.12.0/config/certs/http.p12

# 启用节点间传输层安全性 (TLS)
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: /opt/module/elasticsearch-7.12.0/config/certs/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: /opt/module/elasticsearch-7.12.0/config/certs/elastic-certificates.p12
# 此处需注意,es-node-1为上面配置的节点名称
xpack.security.http.ssl.client_authentication: none

注意:

1)一旦你修改xpack.security.http.ssl.enabled为true并重新启动 Elasticsearch,你可以使用 https://your-elasticsearch-host:your-https-port 这样的 URL 来访问 Elasticsearch。

2)network.tcp.no_delay:用于控制 Elasticsearch 节点之间的 TCP 连接是否启用了 Nagle 算法。Nagle 算法是一种用于减少小数据包传输的延迟的算法。它会在发送数据时等待一小段时间,以便将多个小数据包合并成一个大的数据包,然后一起发送。这样做可以减少网络上的流量,但会增加一定的延迟,特别是在低带宽、高延迟的网络环境中。

3)network.tcp.keep_alive,用于控制节点之间 TCP 连接的保活机制。保活机制是一种网络协议特性,用于检测空闲连接是否仍然处于活动状态,以及在发现连接断开时尝试重新建立连接。

4)gateway.recover_after_nodes,在一个 Elasticsearch 集群中,当集群的某个节点启动时,它可能需要一些时间来加入集群,并与其他节点建立连接。在这个过程中,如果集群中的节点数量达到了 gateway.recover_after_nodes 所指定的数量,Elasticsearch 就会开始执行恢复过程,以确保集群中的数据副本能够达到所需的副本数量。设置这个值时,需要权衡节点启动速度和数据恢复的需求,以确保集群在启动和恢复过程中能够维持良好的性能和可用性。

(2)修改配置文件/etc/security/limits.conf

[root@linux100 config]# vim /etc/security/limits.conf

在配置文件中加入以下内容:

# 每个进程可以打开的文件数的限制
es soft nofile 65536
es hard nofile 65536

(3)修改配置文件/etc/security/limits.d/20-nproc.conf,并分发文件到linux101、linux102

[root@linux100 config]# vim /etc/security/limits.d/20-nproc.conf

在配置文件中加入以下内容:

# 每个进程可以打开的文件数的限制
es soft nofile 65536
es hard nofile 65536

# 操作系统级别对每个用户创建的进程数的限制
* hard nproc 4096
# 注:* 带表 Linux 所有用户名称

(4)修改配置文件/etc/sysctl.conf,并分发文件到linux101、linux102

[root@linux100 config]# vim /etc/sysctl.conf

在配置文件中加入以下内容:

# 一个进程可以拥有的 VMA(虚拟内存区域)的数量,默认值为 65536
vm.max_map_count=655360

重新加载

[root@linux100 config]# sysctl -p

2.5 启动软件

分别在不同节点使用es用户启动软件:

[root@linux100 ~]# su es
[es@linux100 ~]$ cd /opt/module/elasticsearch-7.12.0/
[es@linux100 elasticsearch-7.12.0]$ bin/elasticsearch

注意:如果仅后台启动的话,加上-d

[es@linux100 elasticsearch-7.12.0]$ bin/elasticsearch -d

2.6 关闭防火墙

查看防火墙状态:systemctl status firewalld

暂时关闭防火墙:systemctl stop firewalld
永久打开防火墙:systemctl enable firewalld.service 
永久关闭防火墙:systemctl disable firewalld.service
 

防火墙的详细操作可参考下文:

Centos7 防火墙详细操作(Linux)icon-default.png?t=N7T8https://blog.csdn.net/qq_39512532/article/details/131229204

2.7 设置密码

前提条件:必须保证集群状态启动正常,才能进行密码设置

在其中一个节点设置密码即可:

[es@linux100 elasticsearch-7.12.0]$ bin/elasticsearch-setup-passwords interactive

Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.

You will be prompted to enter passwords as the process progresses.

Please confirm that you would like to continue [y/N]y

Enter password for [elastic]:

Reenter password for [elastic]:

Enter password for [apm_system]:

Reenter password for [apm_system]:

Enter password for [kibana]:

Reenter password for [kibana]:

Enter password for [logstash_system]:

Reenter password for [logstash_system]:

Enter password for [beats_system]:

Reenter password for [beats_system]:

Enter password for [remote_monitoring_user]:

Reenter password for [remote_monitoring_user]:

Changed password for user [apm_system]

Changed password for user [kibana]

Changed password for user [logstash_system]

Changed password for user [beats_system]

Changed password for user [remote_monitoring_user]

Changed password for user [elastic]

2.8 测试集群

(1)查看ES集群节点信息

在浏览器中输入地址:http://192.168.243.100:9200/_cat/nodes

以第二行参数为例的相关信息:

参数说明
ip192.168.243.100节点的IP地址
heap.percent12节点的堆内存使用百分比
ram.percent93节点的系统内存使用百分比
cpu0节点的CPU使用率
load_1m0.091分钟负载平均值
load_5m0.045分钟负载平均值
load_15m0.0515分钟负载平均值
node.rolecdfhilmrstw节点的角色
master*指示该节点是否是主节点
namees-node-100节点的名称

(2)查看ES集群服务健康状态

在浏览器中输入地址:http://192.168.243.100:9200/_cat/health

结果显示了一个名为 cluster-es 的集群,它的健康状态是 green(健康),总共有 3 个节点,其中 3 个是数据节点,有 18 个分片,其中 9 个是主分片,没有正在重新分配或初始化的分片,也没有未分配的分片。

相关参数说明:

参数说明
epoch1713732933表示当前时间的毫秒数,通常用于计算时间间隔
timestamp20:55:33表示当前时间的 ISO 8601 格式时间戳
clustercluster-es集群的名称
statusgreen集群的健康状态,可能的值包括 greenyellowred,分别表示健康、一般健康和不健康
node.total3集群中的总节点数
node.data3集群中的数据节点数
shards18分片总数
pri9主分片总数
relo0正在进行重新分配的分片数
init0正在初始化的分片数
unassign0未分配的分片数
pending_tasks0挂起的任务数
max_task_wait_time-最大任务等待时间,这里是没有具体数值
active_shards_percent100.0%活动分片的百分比

3. Kibana软件安装

kibana详细安装如下:

Kibana安装部署(Linux)icon-default.png?t=N7T8https://blog.csdn.net/qq_39512532/article/details/138139138

4. 问题处置

(1) 启动预警提示:usage of JAVA_HOME is deprecated, use ES_JAVA_HOME


解决方案:在配置环境变量的地方加上ES_JAVA_HOME配置就不会再预警了。

有些人在/etc/profile中配置,有些人在/etc/profile.d/路径下创建自定义文件配置环境变量。这里采用的是在/etc/profile.d/路径下创建自定义文件my_env.sh配置环境变量:

1[root@hadoop100 ~]$ vim /etc/profile.d/my_env.sh 

添加如下红框内容:

(2)启动报错:

java.lang.IllegalStateException: failed to obtain node locks, tried [[/opt/module/elasticsearch-7.12.0/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
        at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:292)
        at org.elasticsearch.node.Node.<init>(Node.java:352)
        at org.elasticsearch.node.Node.<init>(Node.java:278)
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:217)
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
        at org.elasticsearch.cli.Command.main(Command.java:79)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)

 

解决方案:由于在服务器中已经启动了Elasticsearch程序,关闭掉,重启就不会有该问题了。

# 查看正在启动的程序
[es@linux100 data]$ jps
12341 Jps
12118 Elasticsearch

# 结束程序:kill -9 进程ID
[es@linux100 data]$ kill -9 12118

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

IDEA 常规设置,让工作便利化

1、自动提示&#xff0c;不区分大小写 File-->Settings-->Editor-->Code completion 然后把Match Case前面的勾选去掉&#xff0c;点击OK保存 2.快速生成main方法设置 idea快速生成main方法的快捷键是psvm (public static void main(String[] args) {}) &#xff1b;…

C语言入门课程学习笔记1

C语言入门课程学习笔记1 第1课 - 概论第2课 -helloworld第3课 -数据输出第4课 -数据类型与变量第5课 - 深入数据类型与变量第6课 - 类型与变量编程练习第7课 - 程序中的数据输入 本文学习自狄泰软件学院 唐佐林老师的 C语言入门课程&#xff0c;图片全部来源于课程PPT&#xff…

分割链表和回文链表习题

感谢大佬的光临各位&#xff0c;希望和大家一起进步&#xff0c;望得到你的三连&#xff0c;互三支持&#xff0c;一起进步 个人主页&#xff1a;LaNzikinh-CSDN博客 收入专栏:初阶数据结构_LaNzikinh篮子的博客-CSDN博客 文章目录 一.回文链表LCR 027. 回文链表 - 力扣&#x…

BUUCTF---[SWPU2019]神奇的二维码

1、下载附件是一张二维码&#xff0c;拿去扫描得到了flag 2、拿去提交是错的&#xff08;不会这么简单哈哈哈&#xff09;&#xff0c;常规操作在kali中分析 3、分离发现图片里面有东西 4、查看txt&#xff0c;发现里面有一串字符&#xff0c;解码后为 5、查看文档&#xff0c…

比特币之路:技术突破、创新思维与领军人物

比特币的兴起是一段充满技术突破、创新思维和领军人物的传奇之路。在这篇文章中&#xff0c;我们将探讨比特币发展的历程&#xff0c;以及那些在这一过程中发挥重要作用的关键人物。 技术突破与前奏 比特币的诞生并非凭空而来&#xff0c;而是建立在先前的技术储备之上。在密码…

小程序 rich-text 解析富文本 图片过大时如何自适应?

在微信小程序中&#xff0c;用rich-text 解析后端返回的数据&#xff0c;当图片尺寸太大时&#xff0c;会溢出屏幕&#xff0c;导致横向出现滚动 查看富文本代码 图片是用 <img 标签&#xff0c;所以写个正则匹配一下图片标签&#xff0c;手动加上样式即可 // content 为后…

(一)、SQL进阶——神奇的SQL

一、CASE表达式 1、CASE表达式概述 case表达式有简单case表达式和搜索case表达式两种写法 -- 简单case表达式 case sex when 1 then 男 when 0 then 女 else 其他 end -- 搜索case表达式 case when sex1 then 男 when sex1 then 男 else 其他 end 这两种写法执行的结…

(5)步态识别论文研读——GaitDAN:基于对抗域适应的跨视角步态识别

GaitDAN: Cross-view Gait Recognition via Adversarial Domain Adaptation | IEEE Journals & Magazine | IEEE Xplore GaitDAN: Cross-view Gait Recognition via Adversarial Domain Adaptation 基于对抗与适应 摘要&#xff1a;视角变化导致步态外观存在显着差异。因…

黄金行情下跌有投资机会吗?

尽管黄金价格的波动常常引起投资者的高度关注&#xff0c;但行情的下跌未必只是警讯&#xff0c;亦可能蕴藏着某些难得的投资机会。总之&#xff0c;答案是肯定的——在黄金行情下跌时&#xff0c;依旧有适宜的投资机会&#xff0c;只是这需要投资者具备相应的应对知识和策略。…

python基础知识点(蓝桥杯python科目个人复习计划66)

今日复习内容&#xff1a;算法双周赛 第一题&#xff1a;疯狂星期六 题目描述&#xff1a; 麦肯鸡是一家名声在外的汉堡店&#xff0c;他们最近推出了一份名为vivo50的套餐&#xff0c;只需要在门口大声喊出vivo50&#xff0c;就可以获得这个套餐。 现在&#xff0c;请你打…

经典案例|使用Supabase解决可视化大屏项目的常见问题

敏博科技专业致力于应急管理行业&#xff0c;提供以物联网技术和感知预警算法模型为核心的先进产品和解决方案。应急管理行业的业务非常繁多和复杂&#xff0c;很多时候都需要在短时间内交付出稳定高效的业务系统。如下两张图某市的安全生产监测预警系统 MemFire Cloud应用开…

WordPress自动采集发布AutoPostPro汉化版插件

WP-AutoPostPro 是一款极为出色的WordPress自动采集发布插件&#xff0c;其显著优势在于能够从任何网站抓取内容并自动将其发布到你的WordPress网站上。它实现了对任何网页内容的自动采集和发布&#xff0c;整个采集过程完全自动化&#xff0c;无需手动操作。 项 目 地 址 &…

BM25检索算法 python

1.简介 BM25&#xff08;Best Matching 25&#xff09;是一种经典的信息检索算法&#xff0c;是基于 TF-IDF算法的改进版本&#xff0c;旨在解决、TF-IDF算法的一些不足之处。其被广泛应用于信息检索领域的排名函数&#xff0c;用于估计文档D与用户查询Q之间的相关性。它是一种…

【结构型模型】享元模式

一、享元模式概述 享元模式定义&#xff1a;又叫蝇量模式&#xff0c;运用共享技术有效地支持大量细粒度对象的复用。系统只使用少量的对象&#xff0c;而这些对象都很相似&#xff0c;状态变化很小&#xff0c;可以实现对象的多次复用。由于享元模式要求能够共享的对象必须是细…

JVM--Java对象到底存在哪?

Java对象存放在堆中&#xff0c;但堆又分为新生代和老年代&#xff0c;新生代又细分为 Eden、From Survivor、To Survivor。那我们创建的对象到底在哪里&#xff1f; 堆分为新生代和老年代&#xff0c;新生代用于存放使用后就要被回收的对象&#xff08;朝生夕死&#xff09;&a…

vue项目使用百度地图

打开百度地图开放平台 百度地图开放平台 | 百度地图API SDK | 地图开发 在控制台新建应用 复制访问应用的ak 可修改地图样式 使用部分 <!-- 引入地图 --><div class"main-aside"><div id"b-map-container"></div></div> …

【数据结构】三、栈和队列:2.顺序栈共享栈(顺序栈的初始化,判空,进栈,出栈,读取栈顶,顺序栈实例)

文章目录 1.顺序栈1.1初始化1.2判空1.3进栈1.4出栈1.5读取栈顶1.6销毁栈❗1.7顺序栈c实例 2.共享栈2.1初始化2.2判满 1.顺序栈 用顺序存储实现的栈 顺序栈的缺点&#xff1a;栈的大小不可变。 #define MaxSize 10 //定义栈中元素的最大个数 typedef struct{ElemType data[…

图像哈希:全局+局部提取特征

文章信息 作者&#xff1a;梁小平&#xff0c;唐振军期刊&#xff1a;ACM Trans. Multimedia Comput. Commun. Appl&#xff08;三区&#xff09;题目&#xff1a;Robust Hashing via Global and Local Invariant Features for Image Copy Detection 目的、实验步骤及结论 目…

CPPTest实例分析(C++ Test)

1 概述 CppTest是一个可移植、功能强大但简单的单元测试框架&#xff0c;用于处理C中的自动化测试。重点在于可用性和可扩展性。支持多种输出格式&#xff0c;并且可以轻松添加新的输出格式。 CppTest下载地址&#xff1a;下载地址1  下载地址2 下面结合实例分析下CppTest如…

进程概念(进程第1篇)【Linux复习篇】

目录 1、冯诺依曼体系结构怎么画&#xff1f;中央处理器是什么&#xff1f;存储器是什么&#xff1f;每个部分有什么作用&#xff1f; 2、什么是操作系统&#xff1f; 3、什么叫进程&#xff1f;操作系统如何管理进程的&#xff1f; 4、怎么查看进程&#xff1f; 5、C语言…
最新文章