openGauss_5.0.1 企业版安装及问题记录(CentOS系统):主备模式服务器安装

目录

  • 📚第一章 官方地址
    • 📗安装包下载地址
    • 📗文档指南
  • 📚第二章 安装
    • 📗准备工作
    • 📗开始安装
      • 📕创建XML配置文件
      • 📕初始化安装环境
      • 📕执行安装
      • 📕验证
  • 📚第三章 安装总结
  • ⁉️问题记录
    • ❓问题一:执行gs_preinstall报错:Python 解释器在编译时未使用 -enable-shared 选项
      • ❗解决方式:重新安装python,放开--enable-shared
    • ❓问题二:No module named '_ctypes'
      • ❗解决方式:安装libffi-devel
    • ❓问题三:libpython3.6m.so.1.0 未找到
      • ❗解决方式:重新安装python3.6(5.0版本只支持python3.6)
    • ❓问题四:Failed to read clusterName. Error:
      • ❗解决方式:配置不对
    • ❓问题五: Failed to obtain local instance information
      • ❗解决方式:修改主机名
    • ❓问题六:[GAUSS-51405] : You need to install software:expect
    • ❓问题七:[FAILURE] bigdata02:[GAUSS-51251] : The /home/opengauss/app cannot be a root user group or a lin
    • ❓问题八:[GAUSS-51405] : You need to install software:['bzip2']

🔼下一集:openGauss_5.1.0 企业版快速安装及数据库连接:单节点容器化安装

📚第一章 官方地址

📗安装包下载地址

https://opengauss.org/zh/download/
在这里插入图片描述
简单注册下账号,登录即可下载,注意对应的操作系统
在这里插入图片描述

📗文档指南

https://docs-opengauss.osinfra.cn/zh/docs/5.0.0/docs/InstallationGuide/InstallationGuide.html
在这里插入图片描述

📚第二章 安装

📗准备工作

关闭防火墙等配置,状态保持和下图一致
在这里插入图片描述

[root@localhost home]# less /etc/selinux/config# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted [root@localhost home]# systemctl status firewalld 
● firewalld.service - firewalld - dynamic firewall daemonLoaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)Active: inactive (dead)Docs: man:firewalld(1)
[root@localhost home]# 

重新启动操作系统(谨慎操作,确保该机器上没有其它应用):

reboot

检查防火墙是否关闭(inactive (dead)):

systemctl status firewalld

关闭防火墙:

systemctl disable firewalld.service
systemctl stop firewalld.service

详见官网-准备软硬件安装环境章节,不同操作系统略存差异
在这里插入图片描述

📗开始安装

📕创建XML配置文件

按需创建目录(也可以直接根据官网的配置文件创建目录,省的修改配置文件了)

mkdir -p /home/opengauss/{app,log,tmp,tool,corefile,data}

创建并修改文件,参考如下,采用的一主一备配置,cluster_config.xml,内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<ROOT><!-- openGauss整体信息 --><CLUSTER><!-- 数据库名称 --><PARAM name="openGaussDB" value="Cluster_template" /><!-- 数据库节点名称(hostname) --><PARAM name="nodeNames" value="bigdata01,bigdata02" /><!-- 数据库安装目录--><PARAM name="gaussdbAppPath" value="/home/opengauss/app" /><!-- 日志目录--><PARAM name="gaussdbLogPath" value="/home/opengauss/log" /><!-- 临时文件目录--><PARAM name="tmpMppdbPath" value="/home/opengauss/tmp"/><!-- 数据库工具目录--><PARAM name="gaussdbToolPath" value="/home/opengauss/tool" /><!-- 数据库core文件目录--><PARAM name="corePath" value="/home/opengauss/corefile"/><!-- 节点IP,与数据库节点名称列表一一对应 --><PARAM name="backIp1s" value="192.168.2.10,192.168.2.11"/> </CLUSTER><!-- 每台服务器上的节点部署信息 --><DEVICELIST><!-- 节点1上的部署信息 --><DEVICE sn="bigdata01"><!-- 节点1的主机名称 --><PARAM name="name" value="bigdata01"/><!-- 节点1所在的AZ及AZ优先级 --><PARAM name="azName" value="AZ1"/><PARAM name="azPriority" value="1"/><!-- 节点1的IP,如果服务器只有一个网卡可用,将backIP1和sshIP1配置成同一个IP --><PARAM name="backIp1" value="192.168.2.10"/><PARAM name="sshIp1" value="10.0.2.10"/><!--dn--><PARAM name="dataNum" value="1"/><PARAM name="dataPortBase" value="15400"/><PARAM name="dataNode1" value="/home/opengauss/data,bigdata02,/home/opengauss/data"/><PARAM name="dataNode1_syncNum" value="0"/></DEVICE><!-- 节点2上的节点部署信息,其中“name”的值配置为主机名称 --><DEVICE sn="bigdata02"><!-- 节点2的主机名称 --><PARAM name="name" value="bigdata02"/><!-- 节点2所在的AZ及AZ优先级 --><PARAM name="azName" value="AZ1"/><PARAM name="azPriority" value="1"/><!-- 节点2的IP,如果服务器只有一个网卡可用,将backIP1和sshIP1配置成同一个IP --><PARAM name="backIp1" value="192.168.2.11"/><PARAM name="sshIp1" value="10.0.2.11"/></DEVICE></DEVICELIST>
</ROOT>

📕初始化安装环境

[root@localhost script]# python3.6 ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml  
Parsing the configuration file.
Successfully parsed the configuration file.
Installing the tools on the local node.
Successfully installed the tools on the local node.
Are you sure you want to create trust for root (yes/no)?yes
Please enter password for root
Please enter password for current user[root].
Password: 
Checking network information.
All nodes in the network are Normal.
Successfully checked network information.
Creating SSH trust.
Creating the local key file.
Successfully created the local key files.
Appending local ID to authorized_keys.
Successfully appended local ID to authorized_keys.
Updating the known_hosts file.
Successfully updated the known_hosts file.
Appending authorized_key on the remote node.
Successfully appended authorized_key on all remote node.
Checking common authentication file content.
Successfully checked common authentication content.
Distributing SSH trust file to all node.
Distributing trust keys file to all node successfully.
Successfully distributed SSH trust file to all node.
Verifying SSH trust on all hosts.
Successfully verified SSH trust on all hosts.
Successfully created SSH trust.
Successfully created SSH trust for the root permission user.
Setting host ip env
Successfully set host ip env.
Distributing package.
Begin to distribute package to tool path.
Successfully distribute package to tool path.
Begin to distribute package to package path.
Successfully distribute package to package path.
Successfully distributed package.
Are you sure you want to create the user[omm] and create trust for it (yes/no)? yes
Preparing SSH service.
Successfully prepared SSH service.
Installing the tools in the cluster.
Successfully installed the tools in the cluster.
Checking hostname mapping.
Successfully checked hostname mapping.
Creating SSH trust for [omm] user.
Please enter password for current user[omm].
Password: 
Checking network information.
All nodes in the network are Normal.
Successfully checked network information.
Creating SSH trust.
Creating the local key file.
Successfully created the local key files.
Appending local ID to authorized_keys.
Successfully appended local ID to authorized_keys.
Updating the known_hosts file.
Successfully updated the known_hosts file.
Appending authorized_key on the remote node.
Successfully appended authorized_key on all remote node.
Checking common authentication file content.
Successfully checked common authentication content.
Distributing SSH trust file to all node.
Distributing trust keys file to all node successfully.
Successfully distributed SSH trust file to all node.
Verifying SSH trust on all hosts.
Successfully verified SSH trust on all hosts.
Successfully created SSH trust.
Successfully created SSH trust for [omm] user.
Checking OS software.
Successfully check os software.
Checking OS version.
Successfully checked OS version.
Creating cluster's path.
Successfully created cluster's path.
Set and check OS parameter.
Setting OS parameters.
Successfully set OS parameters.
Warning: Installation environment contains some warning messages.
Please get more details by "/opt/software/openGauss/script/gs_checkos -i A -h bigdata01,bigdata02 --detail".
Set and check OS parameter completed.
Preparing CRON service.
Successfully prepared CRON service.
Setting user environmental variables.
Successfully set user environmental variables.
Setting the dynamic link library.
Successfully set the dynamic link library.
Setting Core file
Successfully set core path.
Setting pssh path
Successfully set pssh path.
Setting Cgroup.
Successfully set Cgroup.
Set ARM Optimization.
No need to set ARM Optimization.
Fixing server package owner.
Setting finish flag.
Successfully set finish flag.
Preinstallation succeeded.
[root@localhost script]# 

📕执行安装

[root@localhost script]# su - omm
上一次登录:四 411 15:46:24 CST 2024
[omm@bigdata01 ~]$ gs_install -X /opt/software/openGauss/cluster_config.xml
Parsing the configuration file.
Successfully checked gs_uninstall on every node.
Check preinstall on every node.
Successfully checked preinstall on every node.
Creating the backup directory.
Successfully created the backup directory.
begin deploy..
Installing the cluster.
begin prepare Install Cluster..
Checking the installation environment on all nodes.
begin install Cluster..
Installing applications on all nodes.
Successfully installed APP.
begin init Instance..
encrypt cipher and rand files for database.
Please enter password for database:
Please repeat for database:
begin to create CA cert files
The sslcert will be generated in /home/opengauss/app/share/sslcert/om
NO cm_server instance, no need to create CA for CM.
Non-dss_ssl_enable, no need to create CA for DSS
Cluster installation is completed.
Configuring.
Deleting instances from all nodes.
Successfully deleted instances from all nodes.
Checking node configuration on all nodes.
Initializing instances on all nodes.
Updating instance configuration on all nodes.
Check consistence of memCheck and coresCheck on database nodes.
Successful check consistence of memCheck and coresCheck on all nodes.
Configuring pg_hba on all nodes.
Configuration is completed.The cluster status is Normal.
Successfully started cluster.
Successfully installed application.
end deploy..
[omm@bigdata01 ~]$ 

📕验证

数据库安装完成后,会默认生成名称为postgres的数据库

[omm@bigdata01 ~]$ gs_om -t status
-----------------------------------------------------------------------cluster_name    : openGaussDB
cluster_state   : Normal
redistributing  : No-----------------------------------------------------------------------
[omm@bigdata01 ~]$ 
[omm@bigdata01 ~]$ gsql -d postgres -p 15400
gsql ((openGauss 5.1.0 build b5a8d5b0) compiled at 2023-09-28 00:09:57 commit 0 last mr  )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.openGauss=# help
You are using gsql, the command-line interface to gaussdb.
Type:  \copyright for distribution terms\h for help with SQL commands\? for help with gsql commands\g or terminate with semicolon to execute query\q to quit
openGauss=# \h
Available help:ABORT                             ALTER TEXT SEARCH CONFIGURATION   CREATE NODE GROUP                 DROP DIRECTORY                    EXPLAINALTER APP WORKLOAD GROUP          ALTER TEXT SEARCH DICTIONARY      CREATE OPERATOR                   DROP EVENT                        FETCHALTER APP WORKLOAD GROUP MAPPING  ALTER TRIGGER                     CREATE PACKAGE                    DROP EVENT TRIGGER                GRANTALTER AUDIT POLICY                ALTER TYPE                        CREATE PACKAGE BODY               DROP EXTENSION                    INSERTALTER DATA SOURCE                 ALTER USER                        CREATE PROCEDURE                  DROP FOREIGN TABLE                LOCKALTER DATABASE                    ALTER VIEW                        CREATE PUBLICATION                DROP FUNCTION                     MERGEALTER DEFAULT PRIVILEGES          ALTER WORKLOAD GROUP              CREATE RESOURCE LABEL             DROP GLOBAL CONFIGURATION         MOVEALTER DIRECTORY                   ANALYSE                           CREATE RESOURCE POOL              DROP GROUP                        PREDICT BYALTER EVENT                       ANALYZE                           CREATE ROLE                       DROP INDEX                        PREPAREALTER EVENT TRIGGER               ANONYMOUS BLOCK                   CREATE ROW LEVEL SECURITY POLICY  DROP MASKING POLICY               PREPARE TRANSACTIONALTER EXTENSION                   ARCHIVE SNAPSHOT                  CREATE SCHEMA                     DROP MATERIALIZED VIEW            PUBLISH SNAPSHOTALTER FOREIGN TABLE               BEGIN                             CREATE SEQUENCE                   DROP MODEL                        PURGEALTER FOREIGN TABLE FOR HDFS      CALL                              CREATE SERVER                     DROP NODE                         PURGE SNAPSHOTALTER FUNCTION                    CHECKPOINT                        CREATE SNAPSHOT AS                DROP NODE GROUP                   REASSIGN OWNEDALTER GLOBAL CONFIGURATION        CLEAN CONNECTION                  CREATE SNAPSHOT FROM              DROP OPERATOR                     REFRESH MATERIALIZED VIEWALTER GROUP                       CLOSE                             CREATE SUBSCRIPTION               DROP OWNED                        REINDEXALTER INDEX                       CLUSTER                           CREATE SYNONYM                    DROP PACKAGE                      REPLACEALTER LARGE OBJECT                COMMENT                           CREATE TABLE                      DROP PACKAGE BODY                 RESETALTER MASKING POLICY              COMMIT                            CREATE TABLE AS                   DROP PROCEDURE                    REVOKEALTER MATERIALIZED VIEW           COMMIT PREPARED                   CREATE TABLE PARTITION            DROP PUBLICATION                  ROLLBACKALTER NODE                        COPY                              CREATE TABLE SUBPARTITION         DROP RESOURCE LABEL               ROLLBACK PREPAREDALTER NODE GROUP                  CREATE APP WORKLOAD GROUP         CREATE TABLESPACE                 DROP RESOURCE POOL                SAMPLE SNAPSHOTALTER OPERATOR                    CREATE APP WORKLOAD GROUP MAPPING CREATE TEXT SEARCH CONFIGURATION  DROP ROLE                         SAVEPOINTALTER PACKAGE                     CREATE AUDIT POLICY               CREATE TEXT SEARCH DICTIONARY     DROP ROW LEVEL SECURITY POLICY    SELECTALTER PROCEDURE                   CREATE BARRIER                    CREATE TRIGGER                    DROP SCHEMA                       SELECT INTOALTER PUBLICATION                 CREATE CLIENT MASTER KEY          CREATE TYPE                       DROP SEQUENCE                     SETALTER RESOURCE LABEL              CREATE COLUMN ENCRYPTION KEY      CREATE USER                       DROP SERVER                       SET CONSTRAINTSALTER RESOURCE POOL               CREATE DATA SOURCE                CREATE VIEW                       DROP SUBSCRIPTION                 SET ROLEALTER ROLE                        CREATE DATABASE                   CREATE WEAK PASSWORD DICTIONARY   DROP SYNONYM                      SET SESSION AUTHORIZATIONALTER ROW LEVEL SECURITY POLICY   CREATE DIRECTORY                  CREATE WORKLOAD GROUP             DROP TABLE                        SET TRANSACTIONALTER SCHEMA                      CREATE EVENT                      CURSOR                            DROP TABLESPACE                   SHOWALTER SEQUENCE                    CREATE EVENT TRIGGER              DEALLOCATE                        DROP TEXT SEARCH CONFIGURATION    SHOW EVENTSALTER SERVER                      CREATE EXTENSION                  DECLARE                           DROP TEXT SEARCH DICTIONARY       START TRANSACTIONALTER SESSION                     CREATE FOREIGN TABLE              DELETE                            DROP TRIGGER                      TIMECAPSULE TABLEALTER SUBSCRIPTION                CREATE FUNCTION                   DO                                DROP TYPE                         TRUNCATEALTER SYNONYM                     CREATE GROUP                      DROP APP WORKLOAD GROUP           DROP USER                         UPDATEALTER SYSTEM KILL SESSION         CREATE INDEX                      DROP APP WORKLOAD GROUP MAPPING   DROP VIEW                         VACUUMALTER SYSTEM SET                  CREATE LANGUAGE                   DROP AUDIT POLICY                 DROP WEAK PASSWORD DICTIONARY     VALUESALTER TABLE                       CREATE MASKING POLICY             DROP CLIENT MASTER KEY            DROP WORKLOAD GROUP               ALTER TABLE PARTITION             CREATE MATERIALIZED VIEW          DROP COLUMN ENCRYPTION KEY        END                               ALTER TABLE SUBPARTITION          CREATE MODEL                      DROP DATA SOURCE                  EXECUTE                           ALTER TABLESPACE                  CREATE NODE                       DROP DATABASE                     EXECUTE DIRECT                    
openGauss=# 

📚第三章 安装总结

  • 安装5.0.1快要成功的时候,业务人员说应该安装5.1.0,好在安装步骤都一样,只要替换一下安装包即可
  • 安装5.0.1最大的坑就是环境必须是python3.6,但是5.1.0版本,就没这个限制了
    在这里插入图片描述
    在这里插入图片描述
  • 安装过程还有就是其它一些软件安装,除了官网提到的bzip2,还有expect等,根据错误提示缺啥就安装啥即可

⁉️问题记录

❓问题一:执行gs_preinstall报错:Python 解释器在编译时未使用 -enable-shared 选项

[root@localhost openGauss]# cd /opt/software/openGauss/script
[root@localhost script]# ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml
Traceback (most recent call last):File "./gs_preinstall", line 32, in <module>check_python_compiler_option()File "/opt/software/openGauss/script/gspylib/common/CheckPythonVersion.py", line 39, in check_python_compiler_optioncarry the -enable-shared parameters")
Exception: [GAUSS-52200] : When compiling python,             carry the -enable-shared parameters
[root@localhost script]# 

❗解决方式:重新安装python,放开–enable-shared

./configure --enable-optimizations --enable-shared
make
make intall

❓问题二:No module named ‘_ctypes’

[root@localhost script]# /usr/local/bin/python3.7 ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml
Traceback (most recent call last):File "./gs_preinstall", line 48, in <module>from gspylib.common.Common import DefaultValueFile "/opt/software/openGauss/script/gspylib/common/Common.py", line 20, in <module>import ctypesFile "/usr/local/lib/python3.7/ctypes/__init__.py", line 7, in <module>from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
[root@localhost script]# 

❗解决方式:安装libffi-devel

yum install libffi-devel -y

在这里插入图片描述

make && make install

安装好libffi-devel之后,重新编译安装python之后,尝试导入import _ctypes,可以正常导入
在这里插入图片描述

❓问题三:libpython3.6m.so.1.0 未找到

[root@localhost script]# /usr/local/bin/python3.7 ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml
Traceback (most recent call last):File "/opt/software/openGauss/script/gspylib/common/Common.py", line 64, in <module>import psutilFile "/opt/software/openGauss/script/gspylib/common/../../../lib/psutil/__init__.py", line 102, in <module>from . import _pslinux as _psplatformFile "/opt/software/openGauss/script/gspylib/common/../../../lib/psutil/_pslinux.py", line 26, in <module>from . import _psutil_linux as cextFile "/opt/software/openGauss/script/gspylib/common/../../../lib/psutil/_psutil_linux.py", line 7, in <module>__bootstrap__()File "/opt/software/openGauss/script/gspylib/common/../../../lib/psutil/_psutil_linux.py", line 6, in __bootstrap__imp.load_dynamic(__name__,__file__)File "/usr/local/lib/python3.7/imp.py", line 342, in load_dynamicreturn _load(spec)
ImportError: /opt/software/openGauss/script/gspylib/common/../../../lib/psutil/_psutil_linux.so: cannot open shared object file: No such file or directoryDuring handling of the above exception, another exception occurred:Traceback (most recent call last):File "./gs_preinstall", line 48, in <module>from gspylib.common.Common import DefaultValueFile "/opt/software/openGauss/script/gspylib/common/Common.py", line 98, in <module>import psutilFile "/opt/software/openGauss/script/gspylib/common/../../../lib/psutil/__init__.py", line 102, in <module>from . import _pslinux as _psplatformFile "/opt/software/openGauss/script/gspylib/common/../../../lib/psutil/_pslinux.py", line 26, in <module>from . import _psutil_linux as cext
ImportError: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
[root@localhost script]# 
[root@localhost script]# 

❗解决方式:重新安装python3.6(5.0版本只支持python3.6)

在这里插入图片描述

❓问题四:Failed to read clusterName. Error:

[root@localhost script]# python3.6 ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml  
[GAUSS-50204] : Failed to read clusterName. Error: 

❗解决方式:配置不对

配置文件name属性被改了,还原为clusterName即可,value属性是可以改的
在这里插入图片描述

❓问题五: Failed to obtain local instance information

[root@localhost script]# python3.6 ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml  
[GAUSS-51620] : Failed to obtain local instance information. It is not a host name localhost.localdomain.
[root@localhost script]# 

❗解决方式:修改主机名

根据报错修改为对应的主机名,和配置文件保持一致:hostnamectl set-hostname 要修改的名字

[root@localhost script]# python3.6 ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml  
[GAUSS-51620] : Failed to obtain local instance information. It is not a host name localhost.localdomain.
[root@localhost script]# 
[root@localhost script]# 
[root@localhost script]# 
[root@localhost script]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.2.10 bigdata01
192.168.2.11 bigdata02
192.168.2.12 bigdata03
[root@localhost script]# hostname
localhost.localdomain
[root@localhost script]# hostnamectl set-hostname bigdata01
[root@localhost script]# 
[root@localhost script]# 
[root@localhost script]# hostname
bigdata01
[root@localhost script]# 

❓问题六:[GAUSS-51405] : You need to install software:expect

直接根据报错进行软件安装

[root@localhost script]# python3.6 ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml  
[GAUSS-51405] : You need to install software:expect[root@localhost script]# 
[root@localhost script]# yum install -y expect

在这里插入图片描述

❓问题七:[FAILURE] bigdata02:[GAUSS-51251] : The /home/opengauss/app cannot be a root user group or a lin

根据报错进行修改,更改文件所属用户

❓问题八:[GAUSS-51405] : You need to install software:[‘bzip2’]

直接根据报错进行软件安装: yum install -y bzip2

[SUCCESS] bigdata01:
[FAILURE] bigdata02:
[GAUSS-51405] : You need to install software:['bzip2']

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

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

相关文章

【数据结构】第三节:单链表

前言 本篇要求掌握的C语言基础知识&#xff1a;指针、结构体 目录 前言 单链表 概念 对比链表和顺序表 创建链表 实现单链表 准备工作 打印链表 创建节点并初始化 尾插 二级指针的调用 尾插代码 头插 尾删 头删 查找&#xff08;返回节点&#xff09; 在指定位…

C#硬件接口开发------一文了解WMI

&#x1f388;个人主页&#xff1a;靓仔很忙i &#x1f4bb;B 站主页&#xff1a;&#x1f449;B站&#x1f448; &#x1f389;欢迎 &#x1f44d;点赞✍评论⭐收藏 &#x1f917;收录专栏&#xff1a;C# 硬件接口开发 &#x1f91d;希望本文对您有所裨益&#xff0c;如有不足…

优优嗨聚集团:如何优雅地解决个人债务问题,一步步走向财务自由

在快节奏的现代生活中&#xff0c;个人债务问题似乎已成为许多人不得不面对的挑战。正确处理个人债务&#xff0c;不仅关系到个人信用和财务状况&#xff0c;更是实现财务自由的重要一步。本文将为您提供一些实用的建议&#xff0c;帮助您优雅地解决个人债务问题&#xff0c;走…

设计模式之备忘录模式(下)

3&#xff09;实现多次撤销 1.结构图 对负责人类MementoCaretaker进行了修改&#xff0c;在其中定义了一个ArrayList类型的集合对象来存储多个备忘录。 2.代码实现 import java.util.*;public class MementoCaretaker {//定义一个集合来存储多个备忘录private ArrayList mem…

学员分享丨十年架构师感悟:敢于“提出问题”

最近呢小誉收到了一位工作十年的学员投稿&#xff0c;这位学员是2011年从誉天学习HCIE课程并顺利拿证&#xff0c;先后在华为等大厂工作。他想把他这十年的工作经验分享给各位学弟学妹们。 这些经验并非来自于具体的技术实现&#xff0c;而是在架构设计和实施过程中所体会到的一…

Github 2024-04-09 Python开源项目日报 Top10

根据Github Trendings的统计,今日(2024-04-09统计)共有10个项目上榜。根据开发语言中项目的数量,汇总情况如下: 开发语言项目数量Python项目10Vue项目1JavaScript项目1系统设计指南 创建周期:2507 天开发语言:Python协议类型:OtherStar数量:241693 个Fork数量:42010 次…

C++生成动态库,C++和C#以及Java在windows和linux调用

Windows生成dllC库 1、创建动态链接库项目 源文件编写函数 // dllmain.cpp : 定义 DLL 应用程序的入口点。 #include "pch.h"int sum(int a, int b) {return a b; }BOOL APIENTRY DllMain( HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserved) {switch…

【LAMMPS学习】八、基础知识(1.8)键的断裂

8. 基础知识 此部分描述了如何使用 LAMMPS 为用户和开发人员执行各种任务。术语表页面还列出了 MD 术语&#xff0c;以及相应 LAMMPS 手册页的链接。 LAMMPS 源代码分发的 examples 目录中包含的示例输入脚本以及示例脚本页面上突出显示的示例输入脚本还展示了如何设置和运行各…

取出/var/log/secure中一小时内登录失败超过三次的IP

取出/var/log/secure中一小时内登录失败超过三次的IP 前两个字段是日期&#xff0c;第三个字段是小时&#xff0c;第四个字段是IP cat /var/log/secure | sort -i | awk -F [ :] /Failed/{a[$1" "$2" "$3" "$4" "$(NF-3)]}END{for(i …

使用 Python 实现复制粘贴的功能

pandas 里面有一个 pd.read_clipboard 函数&#xff0c;可以根据你复制的内容生成DataFrame。是的&#xff0c;就是我们平时选中&#xff0c;然后 CtrlC 时拷贝的内容。所以比较神奇&#xff0c;那么 pandas 到底是怎么做到的&#xff0c;它是怎么读出我们使用 Ctrl C 复制的内…

【面试题】s += 1 和 s = s + 1的区别

文章目录 1.问题2.发现过程3.解析 1.问题 以下两个程序真的完全等同吗&#xff1f; short s 0; s 1; short s 0; s s 1; 2.发现过程 初看s 1 和 s s 1好像是等价的&#xff0c;没有什么区别。很长一段时间内我也是这么觉得&#xff0c;因为当时学习c语言的时候教科书…

更优性能与性价比,从自建 ELK 迁移到 SLS 开始

作者&#xff1a;荆磊 背景 ELK (Elasticsearch、Logstash、Kibana) 是当下开源领域主流的日志解决方案&#xff0c;在可观测场景下有比较广泛的应用。 随着数字化进程加速&#xff0c;机器数据日志增加&#xff0c;自建 ELK 在面临大规模数据、查询性能等方面有较多问题和挑…

【简单讲解如何安装与配置Composer】

&#x1f3a5;博主&#xff1a;程序员不想YY啊 &#x1f4ab;CSDN优质创作者&#xff0c;CSDN实力新星&#xff0c;CSDN博客专家 &#x1f917;点赞&#x1f388;收藏⭐再看&#x1f4ab;养成习惯 ✨希望本文对您有所裨益&#xff0c;如有不足之处&#xff0c;欢迎在评论区提出…

实时渲染 -- 流明(Lumen)

首先我们需要知道Lumen需要解决哪些问题。 很多人都会问&#xff0c;既然已经有了硬件的Raytracing &#xff0c;我们为什么还要Lumen呢。这是由于很多硬件并不支持 Realtime Raytracing&#xff0c;对于支持的那些硬件&#xff0c; N 卡还算是勉强可以&#xff0c;而 A 卡支持…

震动Github榜!7K Star火爆的数字人竟然开源了,拿走不谢(文末福利免费领)

本号专注于分享Github和Gitee上的高质量开源项目&#xff0c;并致力于推动前沿技术的分享。 软件介绍 Fay数字人框架-带货版是一个用于构建数字人应用场景的开源项目&#xff0c;具有低耦合度的各功能模块。你可以轻松更换声音来源、语音识别、情绪分析、NLP处理、情绪语音合成…

ES6-2:Iterator、Proxy、Promise、生成器函数...

11-Iterator迭代器 打印出的是里面的内容&#xff0c;如果是for in打印出来的是索引&#xff0c;of不能遍历对象Symbol.iterator是js内置的&#xff0c;可以访问直接对象arr[Symbol.iterator]&#xff0c;()调用对象非线性一般不能迭代 后两个是伪数组&#xff0c;但是是真迭…

Android,AMS、WMS、PKMS添加动态控制debug开关功能

问题背景 在framework源码中有很多debug开关,通常我们想要看某个模块的日志,比如说广播,就需要去修改源码,把对应的debug值改为true,但是这种方法耗时耗力,比如说我想看sendBroadcast的流程,但是BroadcastQueue中有很多debug开关,如下: 这种就需要去修改对应的源码才…

腾讯客户端开发实习一面

听说腾讯25年5000offer&#xff0c;我就去了...投完简历&#xff0c;当天晚上做完测评&#xff0c;第二天下午打电话约了第三天面试&#xff0c;额流程很快&#xff0c;快到第三天就寄了... 写在这里做个记录&#xff0c;也可以给学习学妹们经验&#xff0c;文末也有大厂面经合…

ssm050助学贷款+jsp

助学贷款管理系统设计与实现 摘 要 现代经济快节奏发展以及不断完善升级的信息化技术&#xff0c;让传统数据信息的管理升级为软件存储&#xff0c;归纳&#xff0c;集中处理数据信息的管理方式。本助学贷款管理系统就是在这样的大环境下诞生&#xff0c;其可以帮助管理者在短…

Python学习笔记14 - 集合

什么是集合 集合的创建方式 集合的相关操作 集合间的关系 集合的数学操作 集合生成式 列表、字典、元组、集合总结