你是学会了还是学废了:Elasticsearch 7 集群拷贝到其它环境如何重置密码

news2024/9/22 5:29:59

欢迎您关注我的公众号【尚雷的驿站】


公众号:尚雷的驿站
CSDN :https://blog.csdn.net/shlei5580
墨天轮:https://www.modb.pro/u/2436
PGFans:https://www.pgfans.cn/user/home?userId=4159


image.png

前言

本文描述了将生产ES集群打包拷贝到测试环境,原密码失效重置密码的操作过程。

背景描述

目前运维的一套ES集群近期频频产生告警,如经常出现集群节点掉,节点重新加入集群后,节点间分片重新平衡导致ES服务器负载高,另外也经常出现某个索引由于主分片未分配到任何节点,导致该索引状态为red,长时间难以自动回复,导致应用难以写入ES。

收集了ES日志及JDK GC日志信息,通过长时间多方排查,分析认为当前ES这一问题应该和ES集群所使用的JDK版本有关。当前ES版本为7.12.1,未采用ES自带的OpenJDK版本,因为这套ES服务器上也部署了其它JAVA应用程序,为了方便兼容和方便管理,ES和这些服务器上的JAVA应用使用了相同的 jdk1.8.0_202版本。

JDK 1.8是2015年发布的,已经过去好多年了,目前JDK 都已经发布21版本了,而且根据网上建议,在服务器内存较大的情况,使用G1垃圾回收效率要高于CMS垃圾回收,而当前JDK JVM配置的是CMS垃圾回收方式,ES生产服务器内存是128G。ES 7.12.1默认采用的JDK版本是 AdoptOpenJDK (build 16+36)。

计划对ES JDK版本进行升级,为保险起见,决定使用ES自带的JDK,并将GC垃圾回收方式调整为G1。

Java 8是于2014年3月14号发布。从Java 8开始开发代号已经弃用了,所以从Java 8之后已经没有官方的开发代号了。
Java 8u201/202 是最后一个免费的 Oracle JDK 8 版本,Oracle于 2019-01-15 停止免费商用更新

验证测试

为方便验证验证测试,决定搭建ES集群测试环境,在测试环境仿照生产搭建同版本ES和JDK。将生产ES、JDK、Kibana都打包拷贝到测试环境解压,测试环境目录都和生产相同,并参照生产配置了环境变量。

以上准备完毕,启动了测试环境ES服务器各节点ES应用。 然后在启动Kibana时,却出现了报错,无法正常启动,报错信息如下:

[esuser@xsky-node1 bin]$ ./kibana 
  log   [16:11:56.252] [info][plugins-service] Plugin "osquery" is disabled.
  log   [16:11:56.351] [warning][config][deprecation] Setting [elasticsearch.username] to "elastic" is deprecated. You should use the "kibana_system" user instead.
  log   [16:11:56.352] [warning][config][deprecation] Config key [monitoring.cluster_alerts.email_notifications.email_address] will be required for email notifications to work in 8.0."
  log   [16:11:56.352] [warning][config][deprecation] Setting [monitoring.username] to "elastic" is deprecated. You should use the "kibana_system" user instead.
  log   [16:11:56.680] [info][plugins-system] Setting up [100] plugins: [taskManager,licensing,globalSearch,globalSearchProviders,banners,code,usageCollection,xpackLegacy,telemetryCollectionManager,telemetry,telemetryCollectionXpack,kibanaUsageCollection,securityOss,share,newsfeed,mapsLegacy,kibanaLegacy,translations,legacyExport,embeddable,uiActionsEnhanced,expressions,charts,esUiShared,bfetch,data,home,observability,console,consoleExtensions,apmOss,searchprofiler,painlessLab,grokdebugger,management,indexPatternManagement,advancedSettings,fileUpload,savedObjects,visualizations,visTypeVislib,visTypeVega,visTypeTimelion,features,licenseManagement,watcher,canvas,visTypeTagcloud,visTypeTable,visTypeMetric,visTypeMarkdown,tileMap,regionMap,visTypeXy,graph,timelion,dashboard,dashboardEnhanced,visualize,visTypeTimeseries,inputControlVis,discover,discoverEnhanced,savedObjectsManagement,spaces,security,savedObjectsTagging,maps,lens,reporting,lists,encryptedSavedObjects,dataEnhanced,dashboardMode,cloud,upgradeAssistant,snapshotRestore,fleet,indexManagement,rollup,remoteClusters,crossClusterReplication,indexLifecycleManagement,enterpriseSearch,beatsManagement,transform,ingestPipelines,eventLog,actions,alerts,triggersActionsUi,stackAlerts,ml,securitySolution,case,infra,monitoring,logstash,apm,uptime]
  log   [16:11:56.682] [info][plugins][taskManager] TaskManager is identified by the Kibana UUID: 4227be37-8c2a-4580-be72-233bafd4d332
  log   [16:11:56.909] [warning][config][plugins][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
  log   [16:11:56.909] [warning][config][plugins][security] Session cookies will be transmitted over insecure connections. This is not recommended.
  log   [16:11:56.958] [warning][config][plugins][reporting] 为 xpack.reporting.encryptionKey 生成随机密钥。为防止会话在重启时失效,请在 kibana.yml 中设置 xpack.reporting.encryptionKey 或使用 bin/kibana-encryption-keys 命令。
  log   [16:11:56.965] [warning][config][plugins][reporting] Chromium 沙盒提供附加保护层,但不受 Linux CentOS 7.9.2009 OS 支持。自动设置“xpack.reporting.capture.browser.chromium.disableSandbox: true”。
  log   [16:11:56.966] [warning][encryptedSavedObjects][plugins] Saved objects encryption key is not set. This will severely limit Kibana functionality. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
  log   [16:11:56.986] [warning][fleet][plugins] Fleet APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
  log   [16:11:57.054] [warning][actions][actions][plugins] APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
  log   [16:11:57.066] [warning][alerting][alerts][plugins][plugins] APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
  log   [16:11:57.177] [info][monitoring][monitoring][plugins] config sourced from: production cluster
  log   [16:11:57.398] [info][savedobjects-service] Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations...
  log   [16:11:57.550] [warning][licensing][plugins] License information could not be obtained from Elasticsearch due to [security_exception] unable to authenticate user [elastic] for REST request [/_xpack?accept_enterprise=true], with { header={ WWW-Authenticate="Basic realm=\"security\" charset=\"UTF-8\"" } } :: {"path":"/_xpack?accept_enterprise=true","statusCode":401,"response":"{\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"unable to authenticate user [elastic] for REST request [/_xpack?accept_enterprise=true]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}}],\"type\":\"security_exception\",\"reason\":\"unable to authenticate user [elastic] for REST request [/_xpack?accept_enterprise=true]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}},\"status\":401}","wwwAuthenticateDirective":"Basic realm=\"security\" charset=\"UTF-8\""} error
  log   [16:11:57.554] [warning][monitoring][monitoring][plugins] X-Pack Monitoring Cluster Alerts will not be available: [security_exception] unable to authenticate user [elastic] for REST request [/_xpack?accept_enterprise=true], with { header={ WWW-Authenticate="Basic realm=\"security\" charset=\"UTF-8\"" } }

尝试通过浏览器访问其中一个ES,使用原来的用户名和密码,发现无法登陆,界面如下所示:

重置密码

根据以上信息,应该是我拷贝ES环境没有拷贝data等相关目录,密码已经发生了改变,而当前生产data和logs目录空间过大,我无法拷贝,决定对当前测试环境ES密码进行重置。于是采用如下方式对ES密码进行重置。

[esuser@xsky-node1 ~]$ cd deploy/elasticsearch-7.12.1-9300/bin/
[esuser@xsky-node1 bin]$ ./elasticsearch-setup-passwords interactive
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/java/jdk1.8.0_221/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.


Failed to determine the health of the cluster running at http://10.110.7.39:9200
Unexpected response code [503] from calling GET http://10.110.7.39:9200/_cluster/health?pretty
Cause: master_not_discovered_exception

It is recommended that you resolve the issues with your cluster before running elasticsearch-setup-passwords.
It is very likely that the password changes will fail when run against an unhealthy cluster.

Do you want to continue with the password setup process [y/N]ERROR: User cancelled operation



[esuser@xsky-node1 bin]$ ./elasticsearch-setup-passwords interactive
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/java/jdk1.8.0_221/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.

Failed to determine the health of the cluster running at http://10.110.7.39:9200
Unexpected response code [503] from calling GET http://10.110.7.39:9200/_cluster/health?pretty
Cause: master_not_discovered_exception

It is recommended that you resolve the issues with your cluster before running elasticsearch-setup-passwords.
It is very likely that the password changes will fail when run against an unhealthy cluster.

Do you want to continue with the password setup process [y/N]y

Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,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_system]: 
Reenter password for [kibana_system]: 
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]: 

Unexpected response code [503] from calling PUT http://10.110.7.39:9200/_security/user/apm_system/_password?pretty
Cause: Cluster state has not been recovered yet, cannot write to the [null] index

Possible next steps:
* Try running this tool again.
* Try running with the --verbose parameter for additional messages.
* Check the elasticsearch logs for additional error details.
* Use the change password API manually. 

ERROR: Failed to set password for user [apm_system].

执行上述命令后,发现最后修改命令失败。通过综合分析是因为我虽然将生产ES集群打包拷贝到了测试环境,但ES在初始化集群后无法投票选出主节点,当前ES集群并不是一个真正意义上的集群。 可通过如下办法进行修改,停止所有节点ES进程,然后在其中一个节点elasticsearch.yml里设置 cluster.initial_master_nodes. cluster.initial_master_nodes:后跟的是其中一个node节点名称,参照如下设置:

discovery.zen.ping.unicast.hosts: ["10.110.7.39:9300","10.110.7.39:9301","10.110.7.40:9300","10.110.7.40:9301","10.110.7.41:9300","10.110.7.41:9301","10.110.7.42:9300","10.110.7.42:9301"]
cluster.initial_master_nodes: ["node-7.39-9300"]

然后逐次重启节点,节点重启信息如下所示

- 节点一
[esuser@xsky-node1 config]$ ../bin/elasticsearch
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/java/jdk1.8.0_221/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
... 省略部分代码
[2024-05-06T17:16:23,283][INFO ][o.e.x.s.s.SecurityIndexManager] [node-7.39-9300] security index does not exist, creating [.security-7] with alias [.security]
[2024-05-06T17:16:23,373][INFO ][o.e.c.m.MetadataCreateIndexService] [node-7.39-9300] [.security-7] creating index, cause [api], templates [], shards [1]/[0]
[2024-05-06T17:16:23,391][INFO ][o.e.c.r.a.AllocationService] [node-7.39-9300] updating number_of_replicas to [1] for indices [.security-7]
[2024-05-06T17:16:24,408][INFO ][o.e.c.r.a.AllocationService] [node-7.39-9300] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-7][0]]]).
[2024-05-06T17:17:52,114][WARN ][o.e.x.s.a.AuthenticationService] [node-7.39-9300] No authentication credential could be extracted using realms [reserved/reserved,native/native11]. Realms [ldap/ldap1] were skipped because they are not permitted on the current license

--节点三
[esuser@xsky-node3 bin]$ ./elasticsearch 
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/java/jdk1.8.0_221/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/java/jdk1.8.0_221/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
[2024-05-06T17:13:55,404][INFO ][o.e.n.Node               ] [node-7.40-9300] version[7.12.1], pid[609], build[default/tar/3186837139b9c6b6d23c3200870651f10d3343b7/2021-04-20T20:56:39.040728659Z], OS[Linux/3.10.0-1160.83.1.el7.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_211/25.211-b12]
... 省略部分代码
[2024-05-06T17:14:22,605][INFO ][o.e.x.s.a.TokenService   ] [node-7.41-9300] refresh keys
[2024-05-06T17:14:22,935][INFO ][o.e.x.s.a.TokenService   ] [node-7.41-9300] refreshed keys
[2024-05-06T17:14:22,999][INFO ][o.e.l.LicenseService     ] [node-7.41-9300] license [839c87b6-4eea-4e98-908b-a1595ac6561d] mode [basic] - valid
[2024-05-06T17:14:23,001][INFO ][o.e.x.s.s.SecurityStatusChangeListener] [node-7.41-9300] Active license is now [BASIC]; Security is enabled
[2024-05-06T17:14:23,013][WARN ][o.e.x.s.a.AuditTrailService] [node-7.41-9300] Auditing logging is DISABLED because the currently active license [BASIC] does not permit it
[2024-05-06T17:14:23,022][INFO ][o.e.h.AbstractHttpServerTransport] [node-7.41-9300] publish_address {10.110.7.41:9200}, bound_addresses {10.110.7.41:9200}
[2024-05-06T17:14:23,022][INFO ][o.e.n.Node               ] [node-7.41-9300] started

通过以上操作后,重启了各ES节点应用,此时选出了主节点。 然后再次使用elasticsearch-setup-passwords interactive命令修改密码,结果如下所示:

[esuser@xsky-node1 bin]$ ./elasticsearch-setup-passwords interactive
Future versions of Elasticsearch will require Java 11; your Java version from [/usr/java/jdk1.8.0_221/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,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   -- 输入y


Enter password for [elastic]:     --设置 ealastic 密码,以下均设置相同密码
Reenter password for [elastic]: 
Enter password for [apm_system]: 
Reenter password for [apm_system]: 
Enter password for [kibana_system]: 
Reenter password for [kibana_system]: 
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_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]

结果验证

通过浏览器,输入其中一个节点ES信息,IP:端口号,使用ealastic 用户及新设置的密码登录,结果如下:

此时再启动kibana,没有再包上面错误,启动信息如下所示:

{"type":"log","@timestamp":"2024-05-15T16:17:39+08:00","tags":["info","plugins-service"],"pid":24059,"message":"Plugin \"osquery\" is disabled."}
{"type":"log","@timestamp":"2024-05-15T16:17:39+08:00","tags":["warning","config","deprecation"],"pid":24059,"message":"Setting [elasticsearch.username] to \"elastic\" is deprecated. You should use the \"kibana_system\" user instead."}
...... 省略部分代码
{"type":"log","@timestamp":"2024-05-15T16:17:39+08:00","tags":["info","plugins-system"],"pid":24059,"message":"Setting up [100] plugins: [taskManager,licensing,globalSearch,globalSearchProviders,banners,code,usageCollection,xpackLegacy,telemetryCollectionManager,telemetry,telemetryCollectionXpack,kibanaUsageCollection,securityOss,share,newsfeed,mapsLegacy,kibanaLegacy,translations,legacyExport,embeddable,uiActionsEnhanced,esUiShared,expressions,charts,bfetch,data,home,observability,console,consoleExtensions,apmOss,searchprofiler,painlessLab,grokdebugger,management,indexPatternManagement,advancedSettings,fileUpload,savedObjects,visualizations,visTypeTimelion,features,licenseManagement,watcher,canvas,visTypeVega,visTypeVislib,visTypeTagcloud,visTypeTable,visTypeMetric,visTypeMarkdown,tileMap,regionMap,visTypeXy,graph,timelion,dashboard,dashboardEnhanced,visualize,visTypeTimeseries,inputControlVis,discover,discoverEnhanced,savedObjectsManagement,spaces,eventLog,security,savedObjectsTagging,maps,lens,encryptedSavedObjects,actions,alerts,triggersActionsUi,stackAlerts,reporting,lists,dataEnhanced,dashboardMode,cloud,upgradeAssistant,snapshotRestore,fleet,indexManagement,rollup,remoteClusters,crossClusterReplication,indexLifecycleManagement,enterpriseSearch,ml,securitySolution,case,infra,monitoring,logstash,apm,uptime,beatsManagement,transform,ingestPipelines]"}

...... 省略部分代码

{"type":"log","@timestamp":"2024-05-15T16:17:39+08:00","tags":["warning","plugins","reporting","config"],"pid":24059,"message":"为 xpack.reporting.encryptionKey 生成随机密钥。为防止会话在重启时失效,请在 kibana.yml 中设置 xpack.reporting.encryptionKey 或使用 bin/kibana-encryption-keys 命令。"}
{"type":"log","@timestamp":"2024-05-15T16:17:39+08:00","tags":["warning","plugins","reporting","config"],"pid":24059,"message":"Chromium 沙盒提供附加保护层,但不受 Linux CentOS 7.9.2009 OS 支持。自动设置“xpack.reporting.capture.browser.chromium.disableSandbox: true”。"}

Migration completed after 580ms"}
{"type":"log","@timestamp":"2024-05-15T16:17:41+08:00","tags":["info","plugins-system"],"pid":24059,"message":"Starting [100] plugins: [taskManager,licensing,globalSearch,globalSearchProviders,banners,code,usageCollection,xpackLegacy,telemetryCollectionManager,telemetry,telemetryCollectionXpack,kibanaUsageCollection,securityOss,share,newsfeed,mapsLegacy,kibanaLegacy,translations,legacyExport,embeddable,uiActionsEnhanced,esUiShared,expressions,charts,bfetch,data,home,observability,console,consoleExtensions,apmOss,searchprofiler,painlessLab,grokdebugger,management,indexPatternManagement,advancedSettings,fileUpload,savedObjects,visualizations,visTypeTimelion,features,licenseManagement,watcher,canvas,visTypeVega,visTypeVislib,visTypeTagcloud,visTypeTable,visTypeMetric,visTypeMarkdown,tileMap,regionMap,visTypeXy,graph,timelion,dashboard,dashboardEnhanced,visualize,visTypeTimeseries,inputControlVis,discover,discoverEnhanced,savedObjectsManagement,spaces,eventLog,security,savedObjectsTagging,maps,lens,encryptedSavedObjects,actions,alerts,triggersActionsUi,stackAlerts,reporting,lists,dataEnhanced,dashboardMode,cloud,upgradeAssistant,snapshotRestore,fleet,indexManagement,rollup,remoteClusters,crossClusterReplication,indexLifecycleManagement,enterpriseSearch,ml,securitySolution,case,infra,monitoring,logstash,apm,uptime,beatsManagement,transform,ingestPipelines]"}
{"type":"log","@timestamp":"2024-05-15T16:17:42+08:00","tags":["listening","info"],"pid":24059,"message":"Server running at http://10.110.7.39:5601/path/klog"}

总结

通过以上方法重置了ES账号密码,最后将 cluster.initial_master_nodes 注释。再重启ES集群,这样就以后可以灵活选主。 这种修改密码的方式也适合原ES集群密码丢失。我在网上查找ES重置密码时,看到有些博主设置的方式也不一样,所以还是要针对自己的环境灵活进行修改。

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

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

相关文章

线性模型之岭回归的用法

实战:使用岭回归模型 完整代码: import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression from sklearn.datasets import make_regression from sklearn.model_selection import train_test_split fro…

平芯微PW4056HH中文规格书

概述 PW4056HH 是一款完整的采用恒定电流/恒定电压的高压、大电流、单节锂离子电池线性充电 IC。充电电流可达 1A。输入 MAX 低工作电压 3.75V,降低充电功耗,提高效率。 PW4056HH 采用了内部 PMOS 架构,加上防反充电路,不需要外部…

Java开发大厂面试第04讲:深入理解ThreadPoolExecutor,参数含义与源码执行流程全解

线程池是为了避免线程频繁的创建和销毁带来的性能消耗,而建立的一种池化技术,它是把已创建的线程放入“池”中,当有任务来临时就可以重用已有的线程,无需等待创建的过程,这样就可以有效提高程序的响应速度。但如果要说…

Linux服务器lvm磁盘管理fdisk和df磁盘大小不同修改

服务器端由于硬盘是通过VCenter原来100G磁盘复制的虚拟机,复制完成后,原来100G的磁盘通过选择 磁盘重新复制出150G的磁盘,开机后发现还是原来的100G的磁盘,通过fdisk -l 查看有个sdb是150G, 但是已经划转的lvm盘只有100G, 通过df查看也是原来的100G: pvs查看pv里也是10…

【链路层和局域网】

文章目录 链路层和局域网网络节点的连接方式数据链路层和局域网链路层导论链路层:上下文链路层服务链路层在哪里实现?适配器通信错误检测奇偶校验校验和:CRC(循环冗余校验)多点访问链路和协议多路访问协议MAC&#xff…

立创EDA绘制PCB电路板

1、绘制好原理图后,点击设计---原理图转PCB,生成PCB文件 2、将元器件拖入电路板方框内,摆放布局并使用工具栏布线、放置过孔及丝印 3、然后顶层和底层铺铜 4、后面就可以生成制板文件发送嘉立创制板了。

基于国产LoRa的智慧农业解决方案--ASR6601、SX1278

我国《数字乡村发展战略纲要》明确指出“要推进农业数字化转型”,加快推广云计算、大数据、物联网、人工智能在农业生产经营管理中的运用。 然而,目前我国的农业数字化转型还面临着诸多挑战。我国整体农业机械化程度和自动化控制水平仍然较低。由于农田面…

ubuntu quota配置磁盘配额

安装quota工具:sudo apt-get install quota这条命令会安装quota工具&#xff0c;它用于在Linux系统中管理和强制执行磁盘配额。编辑用户quota:sudo edquota -u <username> /data这条命令会打开默认的文本编辑器&#xff0c;允许你为用户liushenshen在/data文件系统上设置…

三.Ubuntu安装MySql数据库

三.Ubuntu安装MySql数据库 1.首先进入Console,登录Ubuntu系统后,更新源,命令:apt update,如图所示。 安装MySQL命令:apt install mysql-server 执行期间按回车,进行下一步,执行过程如图所示: 选择yes或no,此步选择yes 安装完成。 2.提高MySQL安全性,该命令…

代码行数统计工具cloc

Release v2.00 AlDanial/cloc GitHub 代码量代码行数统计工具cloc的正确使用(windows平台亲测有效&#xff0c;本人踩过坑&#xff0c;文中提到&#xff01;)_cloc代码统计工具-CSDN博客

libssh C++封装之六(Dir)

1 概述 libssh是一个在客户端和服务器端实现SSHv2协议的多平台C库。使用libssh,您可以远程执行程序、传输文件、使用安全透明的隧道、管理公钥等等。本文描述的对libssh客户端功能的C++封装。 libssh下载地址 3 实现 3.5 Dir Dir类型管理远程路径,通过SFTP和Channel实现(有…

so-vits-svc:AI翻唱,语音克隆

前言 这个项目是为了让开发者最喜欢的动画角色唱歌而开发的&#xff0c;任何涉及真人的东西都与开发者的意图背道而驰。 项目地址&#xff1a;https://github.com/svc-develop-team/so-vits-svc/blob/4.1-Stable/README_zh_CN.md 安装 可以自行配置&#xff0c;应该也不难 …

做简单易用的GIS资源管理软件

在室外资源管理领域&#xff0c;采用基于GIS的解决方案已成为主流趋势&#xff0c;旨在实现资源的高效利用和管理。GIS技术结合资源对象的规划、定位和监控&#xff0c;为企业提供全面的管理方案&#xff0c;从而优化资源使用、提高运营效率和降低成本。 然而&#xff0c;许多资…

新手也能看懂的前端单元测试框架:Vitest

单元测试的概念及作用 1.什么是单元测试&#xff1f; 单元测试是测试中的一个重要环节&#xff0c;它针对软件中的最小可测试单元进行验证&#xff0c;通常是指对代码中的单个函数、方法或模块进行测试。 单元测试旨在确定特定部分代码的行为是否符合预期&#xff0c;通过针…

618值得入手的数码好物如何选?热门爆款数码好物清单分享

618购物节即将到来&#xff0c;作为年中最重要的购物狂欢盛会之一&#xff0c;各大电商平台将推出众多优惠活动。如果你正准备购买数码产品&#xff0c;那么不要错过这个机会。在本文中&#xff0c;我们将为你介绍几款值得关注的热门数码产品&#xff0c;帮助你在618购物节中做…

linux使用教程(命令介绍、命令格式和命令的使用技巧)

一、命令的格式 1.1 打开终端的方式 ubuntu中的命令基本都是在终端执行的 打开终端的方式&#xff1a; 第一种方法&#xff1a;在ubuntu桌面中鼠标右键选择“打开终端” 第二种方法&#xff1a;使用快捷键ctrl alt t 1.2 终端提示符 stuqfedu:~$ 对于这个提示符 stu&…

css画三角形

使用border div {border-top: 50px solid yellowgreen;border-bottom: 50px solid deeppink;border-left: 50px solid bisque;border-right: 50px solid chocolate; }如果想要单个的三角形&#xff0c;把其它三边的颜色设为transparent即可 使用 conic-gradient 绘制三角形 …

Mysql数据库二进制日志导致磁盘满了处理过程

数据库的二进制日志是数据库管理系统&#xff08;DBMS&#xff09;用来记录所有对数据库进行修改的操作的记录。这种日志对于数据库的备份、恢复、复制和审计等操作至关重要。 以MySQL数据库为例&#xff0c;二进制日志&#xff08;Binary Log&#xff09;记录了所有更改数据的…

无代码无国界:我们正在走向软件安全的狂野西部吗?

我们使用的几乎所有东西都是基于代码构建的&#xff0c;从汽车到智能冰箱再到门铃。在企业中&#xff0c;无数的应用程序保持设备、工作流程和操作的运行。因此&#xff0c;当早期的无代码开发平台于 2010 年推出时&#xff0c;承诺为公民开发人员提供更易于访问的应用程序开发…