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

news2024/11/24 6:51:20

目录

  • 📚第一章 官方地址
    • 📗安装包下载地址
    • 📗文档指南
  • 📚第二章 安装
    • 📗准备工作
    • 📗开始安装
      • 📕创建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 daemon
   Loaded: 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                    EXPLAIN
  ALTER APP WORKLOAD GROUP          ALTER TEXT SEARCH DICTIONARY      CREATE OPERATOR                   DROP EVENT                        FETCH
  ALTER APP WORKLOAD GROUP MAPPING  ALTER TRIGGER                     CREATE PACKAGE                    DROP EVENT TRIGGER                GRANT
  ALTER AUDIT POLICY                ALTER TYPE                        CREATE PACKAGE BODY               DROP EXTENSION                    INSERT
  ALTER DATA SOURCE                 ALTER USER                        CREATE PROCEDURE                  DROP FOREIGN TABLE                LOCK
  ALTER DATABASE                    ALTER VIEW                        CREATE PUBLICATION                DROP FUNCTION                     MERGE
  ALTER DEFAULT PRIVILEGES          ALTER WORKLOAD GROUP              CREATE RESOURCE LABEL             DROP GLOBAL CONFIGURATION         MOVE
  ALTER DIRECTORY                   ANALYSE                           CREATE RESOURCE POOL              DROP GROUP                        PREDICT BY
  ALTER EVENT                       ANALYZE                           CREATE ROLE                       DROP INDEX                        PREPARE
  ALTER EVENT TRIGGER               ANONYMOUS BLOCK                   CREATE ROW LEVEL SECURITY POLICY  DROP MASKING POLICY               PREPARE TRANSACTION
  ALTER EXTENSION                   ARCHIVE SNAPSHOT                  CREATE SCHEMA                     DROP MATERIALIZED VIEW            PUBLISH SNAPSHOT
  ALTER FOREIGN TABLE               BEGIN                             CREATE SEQUENCE                   DROP MODEL                        PURGE
  ALTER FOREIGN TABLE FOR HDFS      CALL                              CREATE SERVER                     DROP NODE                         PURGE SNAPSHOT
  ALTER FUNCTION                    CHECKPOINT                        CREATE SNAPSHOT AS                DROP NODE GROUP                   REASSIGN OWNED
  ALTER GLOBAL CONFIGURATION        CLEAN CONNECTION                  CREATE SNAPSHOT FROM              DROP OPERATOR                     REFRESH MATERIALIZED VIEW
  ALTER GROUP                       CLOSE                             CREATE SUBSCRIPTION               DROP OWNED                        REINDEX
  ALTER INDEX                       CLUSTER                           CREATE SYNONYM                    DROP PACKAGE                      REPLACE
  ALTER LARGE OBJECT                COMMENT                           CREATE TABLE                      DROP PACKAGE BODY                 RESET
  ALTER MASKING POLICY              COMMIT                            CREATE TABLE AS                   DROP PROCEDURE                    REVOKE
  ALTER MATERIALIZED VIEW           COMMIT PREPARED                   CREATE TABLE PARTITION            DROP PUBLICATION                  ROLLBACK
  ALTER NODE                        COPY                              CREATE TABLE SUBPARTITION         DROP RESOURCE LABEL               ROLLBACK PREPARED
  ALTER NODE GROUP                  CREATE APP WORKLOAD GROUP         CREATE TABLESPACE                 DROP RESOURCE POOL                SAMPLE SNAPSHOT
  ALTER OPERATOR                    CREATE APP WORKLOAD GROUP MAPPING CREATE TEXT SEARCH CONFIGURATION  DROP ROLE                         SAVEPOINT
  ALTER PACKAGE                     CREATE AUDIT POLICY               CREATE TEXT SEARCH DICTIONARY     DROP ROW LEVEL SECURITY POLICY    SELECT
  ALTER PROCEDURE                   CREATE BARRIER                    CREATE TRIGGER                    DROP SCHEMA                       SELECT INTO
  ALTER PUBLICATION                 CREATE CLIENT MASTER KEY          CREATE TYPE                       DROP SEQUENCE                     SET
  ALTER RESOURCE LABEL              CREATE COLUMN ENCRYPTION KEY      CREATE USER                       DROP SERVER                       SET CONSTRAINTS
  ALTER RESOURCE POOL               CREATE DATA SOURCE                CREATE VIEW                       DROP SUBSCRIPTION                 SET ROLE
  ALTER ROLE                        CREATE DATABASE                   CREATE WEAK PASSWORD DICTIONARY   DROP SYNONYM                      SET SESSION AUTHORIZATION
  ALTER ROW LEVEL SECURITY POLICY   CREATE DIRECTORY                  CREATE WORKLOAD GROUP             DROP TABLE                        SET TRANSACTION
  ALTER SCHEMA                      CREATE EVENT                      CURSOR                            DROP TABLESPACE                   SHOW
  ALTER SEQUENCE                    CREATE EVENT TRIGGER              DEALLOCATE                        DROP TEXT SEARCH CONFIGURATION    SHOW EVENTS
  ALTER SERVER                      CREATE EXTENSION                  DECLARE                           DROP TEXT SEARCH DICTIONARY       START TRANSACTION
  ALTER SESSION                     CREATE FOREIGN TABLE              DELETE                            DROP TRIGGER                      TIMECAPSULE TABLE
  ALTER SUBSCRIPTION                CREATE FUNCTION                   DO                                DROP TYPE                         TRUNCATE
  ALTER SYNONYM                     CREATE GROUP                      DROP APP WORKLOAD GROUP           DROP USER                         UPDATE
  ALTER SYSTEM KILL SESSION         CREATE INDEX                      DROP APP WORKLOAD GROUP MAPPING   DROP VIEW                         VACUUM
  ALTER SYSTEM SET                  CREATE LANGUAGE                   DROP AUDIT POLICY                 DROP WEAK PASSWORD DICTIONARY     VALUES
  ALTER 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_option
    carry 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 DefaultValue
  File "/opt/software/openGauss/script/gspylib/common/Common.py", line 20, in <module>
    import ctypes
  File "/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 psutil
  File "/opt/software/openGauss/script/gspylib/common/../../../lib/psutil/__init__.py", line 102, in <module>
    from . import _pslinux as _psplatform
  File "/opt/software/openGauss/script/gspylib/common/../../../lib/psutil/_pslinux.py", line 26, in <module>
    from . import _psutil_linux as cext
  File "/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_dynamic
    return _load(spec)
ImportError: /opt/software/openGauss/script/gspylib/common/../../../lib/psutil/_psutil_linux.so: cannot open shared object file: No such file or directory

During 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 DefaultValue
  File "/opt/software/openGauss/script/gspylib/common/Common.py", line 98, in <module>
    import psutil
  File "/opt/software/openGauss/script/gspylib/common/../../../lib/psutil/__init__.py", line 102, in <module>
    from . import _pslinux as _psplatform
  File "/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.localdomain6

192.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.coloradmin.cn/o/1590038.html

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

相关文章

前端用 HTML5 + CSS3 + JavaScript,后端连接什么数据库更简单?

当前端使用 HTML5、CSS3 和 JavaScript 进行开发时&#xff0c;后端连接何种数据库是一个非常重要的问题&#xff0c;因为数据库的选择直接影响着后端代码的编写、数据存储与查询的效率以及系统的可维护性。 1. 关系型数据库&#xff08;SQL 数据库&#xff09;&#xff1a; …

关于“使用java中的二维矩阵方法生成二维码“ 以及 “Java加载外部字体文件时出错的原因“

生成二维码 铁铁们,这两日写了一个导出二维码的接口,要求有一个是在二维码下方生成字体,现在奉上生成二维码的代码: controller层 Operation(summary "导出机构二维码",description "导出机构二维码")GetMapping("/orgCode")public void getO…

Session缓存、Hibernate处理对象的状态了解

Session接口 Session接口是Hibernate向应用程序提供的操纵数据库的最主要的接口&#xff0c;它提供了基本的保存&#xff0c;更新&#xff0c;删除和查询的方法。 Session是有一个缓存, 又叫Hibernate的一级缓存 session缓存是由一系列的Java集合构成的。当一个对象被加入到…

element table 使用了表格固定height高度和表格属性fixed属性出现了高度错乱bug

问题描述&#xff1a;因为使用了表格固定height高度所以 使用表格属性fixed属性出现了高度错乱bug知识点&#xff1a;使用element table 里提供的doLayout 方法 代码 // template <el-table ref"test" ></el-table>//js// 查询数据getList(obj{}) {get…

当你的项目体积比较大?你如何做性能优化

在前端开发中&#xff0c;项目体积优化是一个重要的环节&#xff0c;它直接影响到网页的加载速度和用户体验。随着前端项目越来越复杂&#xff0c;引入的依赖也越来越多&#xff0c;如何有效地减少最终打包文件的大小&#xff0c;成为了前端工程师需要面对的挑战。以下是一些常…

008Node.js模块、自定义模块和CommonJs

CommonJS API定义很多普通应用程序(主要指非浏览器的应用)使用的API&#xff0c;从而填补了这个空白。它的终极目标是提供一个类似Python&#xff0c;Ruby和Java标 准库。这样的话&#xff0c;开发者可以使用CommonJS API编写应用程序&#xff0c;然后这些应用可以运行在不同的…

时钟周期检测标志信号

在某些情况下需要对系统时钟分频后的时钟进行周期检测&#xff0c;引出周期标志信号以便在后续其他情况的使用。虽然在大多数情况下我们能够知道分频后的时钟是系统时钟的几倍分频&#xff0c;但为增强在分频时钟改变情况下周期标志信号的复用性或对未知时钟的周期检测&#xf…

第六季:RTSP协议详解与实时流视频预览

目录 前言1 环境准备2 H.264编码原理和基本概念2.1 图像冗余信息2.2 h.264编码相关的一些概念2.3 h264视频流总体分析2.4 H264的NAL单元详解22.4.1 相关概念 2.5 NALU详解2.6 sps和pps详解2.7 H264的profile和level2.8 序列sequence 前言 本篇文章用于记录实验过程 1 环境准备…

【YUNBEE云贝-进阶课】MySQL8.0性能优化实战培训

众多已经学习过MySQL 8.0 OCP认证专家的课程的同学们对 MySQL 8.0 的安装部署、体系结构、配置监控、用户管理、主从复制、系统运维、MGR等基础操作和动手实验有了一定的学习基础.很多学员反馈希望更进一步提升技术能力、解决工作中碰到的性能问题。 针对MySQL8.0的数据库性能优…

设计模式代码实战-建造者模式

1、问题描述 小明家新开了一家自行车工厂&#xff0c;用于使用自行车配件&#xff08;车架 frame 和车轮 tires &#xff09;进行组装定制不同的自行车&#xff0c;包括山地车和公路车。 山地车使用的是Aluminum Frame&#xff08;铝制车架&#xff09;和 Knobby Tires&#x…

softmax回归:多分类问题的解码器

随着人工智能技术的不断发展&#xff0c;分类问题在机器学习领域中的地位日益凸显。在众多分类算法中&#xff0c;softmax回归以其独特的优势和广泛的应用场景&#xff0c;成为了处理多分类问题的有力工具。本文将深入探讨softmax回归的原理、应用及其优缺点&#xff0c;以期为…

实现智能水控 | 基于ACM32 MCU的分体式水控方案

分体式水控概述 分体式水控是一种常见的水控系统&#xff0c;它的工作原理是通过水的流动来控制水的供应和排放&#xff0c;该系统一般由两部分组成&#xff1a;控制器和水阀。控制器负责监测水的流量和压力&#xff0c;根据设定的参数来控制水阀的开和关&#xff0c;从而实现水…

上位机图像处理和嵌入式模块部署(qmacvisual缺失的光源控制)

【 声明&#xff1a;版权所有&#xff0c;欢迎转载&#xff0c;请勿用于商业用途。 联系信箱&#xff1a;feixiaoxing 163.com】 有些场景下面&#xff0c;是不需要光源和光源控制的&#xff0c;比如说利用摄像头识别对应区域的库位&#xff0c;这部分直接利用红外光采集对应的…

找出mongodb的jumbo块并进行分裂

https://www.cnblogs.com/abclife/p/15968628.html 根据这篇文档中的脚本&#xff0c;在我们自己的环境中跑了下&#xff0c;第一次跑的结果如下&#xff1a; 运行完上面跑出的split脚本后&#xff0c;还是存在jumbo块&#xff0c;第二次跑出的结果&#xff1a; 从上面结果可以…

3、JVM对象的创建于内存分配原理

对象的创建 对象创建的主要流程: 1.类加载检查 虚拟机遇到一条new指令时&#xff0c;首先将去检查这个指令的参数是否能在常量池中定位到一个类的符号引用&#xff0c;并且检查这个符号引用代表的类是否已被加载、解析和初始化过。如果没有&#xff0c;那必须先执行相应的类加…

【hive】远程remote debug hive的方法,用于hive监听器/钩子编写

背景 写hive监听器时候需要拿到hive对象但hive是在集群linux主机上运行的。通过jdbc提交的sql具体执行过程不会再idea中运行。所以如果需要拿到hive对象有可能存在两个思路&#xff1a; &#xff08;1&#xff09;想办法写个钩子或者监听器&#xff0c;将需要的内容写成json字…

【微信小程序】canvas开发笔记

【微信小程序】canvasToTempFilePath:fail fail canvas is empty 看说明书 最好是先看一下官方文档点此前往 如果是canvas 2d 写canvas: this.canvas,&#xff0c;如果是旧版写canvasId: ***, 解决问题 修改对应的代码&#xff0c;如下所示&#xff0c;然后再试试运行&#x…

请求分发场景下的鉴权问题

说明&#xff1a;记录一次对请求分发&#xff0c;无法登录系统的问题。 场景 如下&#xff0c;在此结构下&#xff0c;如何判断该用户是已登录的用户&#xff1b; 常规操作&#xff0c;用户登录后给用户发Token&#xff0c;同时将发放的Token存入到Redis中。要求用户后续请求…

鸿蒙OS开发实例:【Native C++】

介绍 本篇Codelab主要介绍如何使用DevEco Studio创建一个Native C应用。应用采用Native C模板&#xff0c;实现使用NAPI调用C标准库的功能。使用C标准库hypot接口计算两个给定数平方和的平方根。在输入框中输入两个数字&#xff0c;点击计算结果按钮显示计算后的数值。 相关概…

【论文研读】Geometric Deep Learning on Molecular Representations

Geometric Deep Learning on Molecular Representationshttps://arxiv.org/pdf/2107.12375.pdf 一、Background 随着网络时代的发展&#xff0c;生活中产生的数据量越来越多&#xff0c;但数据大体分为两类&#xff1a;欧氏数据、非欧氏数据。如图为两类常见的数据&#xff0c…