openGauss学习笔记-04 openGauss极简版单机主备安装部署

news2025/4/19 0:12:38

文章目录

    • openGauss学习笔记-04 openGauss极简版单机主备安装部署
      • 4.1 获取安装包
        • 4.1.1 下载对应平台的安装包
        • 4.1.2 解压安装包
        • 4.1.3 查看目录结构
      • 4.2 准备软硬件安装环境
        • 4.2.1 硬件环境要求
        • 4.2.2 软件环境要求
        • 4.2.3 软件依赖要求
      • 4.3 单机主备安装部署
        • 4.3.1 安装前准备
        • 4.3.2 单机主备安装
        • 4.3.3 安装后检查
        • 4.3.4 服务启停

openGauss学习笔记-04 openGauss极简版单机主备安装部署

4.1 获取安装包

4.1.1 下载对应平台的安装包

从openGauss开源社区下载对应平台的安装包

  1. 登录openGauss开源社区,选择对应平台的最新安装包下载。对于个人开发者或非企业级环境,下载极简安装包(不安装OM等组件)即可。

image-20230317214331191

  1. 单击“立即下载”。

image-20230317214403635

4.1.2 解压安装包

解压安装包,检查安装目录及文件是否齐全。在安装包所在目录执行以下命令:

[root@localhost ~]# cd /opt
[root@localhost opt]# mkdir openGauss
[root@localhost opt]# ls
openGauss openGauss-3.1.1-openEuler-64bit.tar.bz2  patch_workspace
[root@localhost opt]# tar -jxf openGauss-3.1.1-openEuler-64bit.tar.bz2 -C openGauss/

4.1.3 查看目录结构

执行tree命令,显示类似如下信息:

[root@localhost opt]# tree -d openGauss
openGauss
├── bin
├── etc
│   └── kerberos
├── include
│   └── postgresql
│       └── server
│           ├── access
│           │   ├── obs
│           │   ├── parallel_recovery
│           │   └── ustore
│           │       └── undo
│           ├── alarm
│           ├── bulkload
│           ├── catalog
│           ├── cjson
│           ├── client_logic
│           ├── cm
│           ├── commands
│           ├── communication
│           ├── datatype
│           ├── db4ai
│           ├── executor
│           │   └── exec
│           ├── fmgr
│           ├── foreign
│           ├── gssignal
│           ├── gstrace
│           ├── gtm
│           ├── hotpatch
│           ├── instruments
│           ├── knl
│           │   └── knl_guc
│           ├── lib
│           ├── libcomm
│           ├── libpq
│           ├── mb
│           ├── nodes
│           ├── optimizer
│           ├── parser
│           ├── pgxc
│           ├── port
│           ├── portability
│           ├── postmaster
│           ├── replication
│           ├── rewrite
│           ├── ssl
│           ├── storage
│           │   ├── buf
│           │   ├── cstore
│           │   ├── item
│           │   ├── lock
│           │   ├── mot
│           │   └── smgr
│           ├── streaming
│           ├── tcop
│           ├── tde_key_management
│           ├── threadpool
│           ├── utils
│           ├── vecexecutor
│           └── workload
├── jre
│   ├── bin
│   └── lib
│       ├── amd64
│       │   ├── jli
│       │   └── server
│       ├── cmm
│       ├── ext
│       ├── images
│       │   └── cursors
│       ├── jfr
│       ├── management
│       └── security
│           └── policy
│               ├── limited
│               └── unlimited
├── lib
│   ├── krb5
│   │   └── plugins
│   │       └── kdb
│   ├── libsimsearch
│   └── postgresql
│       ├── java
│       ├── pg_plugin
│       ├── pgxs
│       │   ├── config
│       │   └── src
│       │       └── makefiles
│       └── proc_srclib
├── share
│   ├── llvmir
│   ├── postgresql
│   │   ├── db4ai
│   │   │   └── snapshots
│   │   ├── extension
│   │   ├── timezone
│   │   │   ├── Africa
│   │   │   ├── America
│   │   │   │   ├── Argentina
│   │   │   │   ├── Indiana
│   │   │   │   ├── Kentucky
│   │   │   │   └── North_Dakota
│   │   │   ├── Antarctica
│   │   │   ├── Arctic
│   │   │   ├── Asia
│   │   │   ├── Atlantic
│   │   │   ├── Australia
│   │   │   ├── Brazil
│   │   │   ├── Canada
│   │   │   ├── Chile
│   │   │   ├── Etc
│   │   │   ├── Europe
│   │   │   ├── Indian
│   │   │   ├── Mexico
│   │   │   ├── Mideast
│   │   │   ├── Pacific
│   │   │   └── US
│   │   ├── timezonesets
│   │   ├── tmp
│   │   └── tsearch_data
│   └── sslcert
│       ├── gsql
│       └── om
└── simpleInstall

124 directories
[root@localhost opt]# 

4.2 准备软硬件安装环境

本节描述安装前需要进行的环境准备。建议部署openGauss的各服务器具有等价的软硬件配置。

4.2.1 硬件环境要求

下面列出了openGauss服务器应具备的最低硬件要求。在实际产品中,硬件配置的规划需考虑数据规模及所期望的数据库响应速度。请根据实际情况进行规划。

  • 内存

功能调试建议32GB以上。性能测试和商业部署时,单实例部署建议128GB以上。复杂的查询对内存的需求量比较高,在高并发场景下,可能出现内存不足。此时建议使用大内存的机器,或使用负载管理限制系统的并发。

  • CPU

功能调试最小1×8 核 2.0GHz。性能测试和商业部署时,建议1×16核 2.0GHz。CPU超线程和非超线程两种模式都支持。说明:个人开发者最低配置2核4G, 推荐配置4核8G。目前,openGauss仅支持ARM服务器和基于X86_64通用PC服务器的CPU。

  • 硬盘

用于安装openGauss的硬盘需最少满足如下要求:至少1GB用于安装openGauss的应用程序。每个主机需大约300MB用于元数据存储。预留70%以上的磁盘剩余空间用于数据存储。建议系统盘配置为Raid1,数据盘配置为Raid5,且规划4组Raid5数据盘用于安装openGauss。有关Raid的配置方法在本节中不做介绍。请参考硬件厂家的手册或互联网上的方法进行配置,其中Disk Cache Policy一项需要设置为Disabled,否则机器异常掉电后有数据丢失的风险。openGauss支持使用SSD盘作为数据库的主存储设备,支持SAS接口和NVME协议的SSD盘,以RAID的方式部署使用。

  • 网络要求

300兆以上以太网。建议网卡设置为双网卡冗余bond。有关网卡冗余bond的配置方法在本节中不做介绍。请参考硬件厂商的手册或互联网上的方法进行配置。

4.2.2 软件环境要求

  • Linux操作系统
  1. ARM:

openEuler 20.3LTS(推荐采用此操作系统)

麒麟V10 Asianux 7.5

  1. X86:

openEuler 20.3LTS

CentOS 7.6

Asianux 7.6

说明:当前安装包只能在英文操作系统上安装使用。

  • Linux文件系统

    剩余inode个数 > 15亿(推荐)

  • 工具

bzip2

4.2.3 软件依赖要求

openGauss的软件依赖要求如表1 软件依赖要求所示。

建议使用上述操作系统安装光盘或者源中,下列依赖软件的默认安装包,若不存在下列软件,可参看软件对应的建议版本。

表 1 软件依赖要求

所需软件建议版本
libaio-devel建议版本:0.3.109-13
flex要求版本:2.5.31 以上
bison建议版本:2.7-4
ncurses-devel建议版本:5.9-13.20130511
glibc-devel建议版本:2.17-111
patch建议版本:2.7.1-10
redhat-lsb-core建议版本:4.1
readline-devel建议版本:7.0-13
libnsl(openEuler+x86环境中)建议版本 :2.28-36

安装软件依赖包;

[root@localhost ~]# yum install -y libaio-devel \
> flex \
> bison \
> ncurses-devel \
> glibc-devel \
> patch \
> redhat-lsb-core \
> readline-devel \
> libnsl
Last metadata expiration check: 0:10:26 ago on 2023年03月17日 星期五 22时02分48秒.
Package flex-2.6.4-3.oe2203.x86_64 is already installed.
Package bison-3.8.2-1.oe2203.x86_64 is already installed.
Package glibc-devel-2.34-70.oe2203.x86_64 is already installed.
Package patch-2.7.6-12.oe2203.x86_64 is already installed.
No match for argument: redhat-lsb-core
Error: Unable to find a match: redhat-lsb-core
[root@localhost ~]# 

可以看到,系统提示没有找到匹配的redhat-lsb-core包。

经过在openEuler官方镜像仓库查看得知,openEuler不存在这个包,不影响后续安装数据库。

4.3 单机主备安装部署

4.3.1 安装前准备

  1. 关闭防火墙并取消开机自启动

image-20221219190513462 说明:
测试环境下通常会关闭防火墙以避免部分网络因素影响,视实际需求做配置。

  • 停止防火墙

在root权限下停止防火墙

[root@localhost ~]# systemctl stop firewalld  
[root@localhost ~]# 
  • 关闭防火墙自启动

在root权限下关闭防火墙自启动

[root@localhost ~]# systemctl disable firewalld
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
[root@localhost ~]# 

image-20221219190513462 说明:
执行disable命令关闭防火墙的同时,也取消了开机自启动。

  1. 修改SELINUX为disabled
  • 永久关闭

在root权限下修改配置文件。

[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
[root@localhost ~]# 
[root@localhost ~]# cat /etc/sysconfig/selinux 

# 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 these 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 ~]#

image-20221219190513462 说明:

重启后生效。

  • 临时关闭
[root@localhost ~]# setenforce 0
setenforce: SELinux is permissive
[root@localhost ~]# 

image-20221219190513462 说明:

即时生效,但重启后会自动开启。

  1. 设置主机名及主机名解析
[root@localhost ~]# hostnamectl set-hostname superman-21
[root@localhost ~]# echo "192.168.1.21    superman-21" >>/etc/hosts
  1. 创建用户组dbgroup
[root@localhost ~]# groupadd dbgroup
  1. 创建omm用户

创建用户组dbgroup下的普通用户omm,并设置普通用户omm的密码,密码建议设置为Omm@123。

[root@localhost ~]# useradd -g dbgroup omm
[root@localhost ~]# 
[root@localhost ~]# passwd omm
更改用户 omm 的密码 。
新的密码: 
无效的密码: 密码少于 8 个字符
重新输入新的密码: 
抱歉,密码不匹配。

passwd: 鉴定令牌操作错误
[root@localhost ~]# 
[root@localhost ~]# passwd omm
更改用户 omm 的密码 。
新的密码: 
无效的密码: 密码少于 8 个字符
重新输入新的密码: 
passwd:所有的身份验证令牌已经成功更新。
[root@localhost ~]# 
  1. 设置安装文件属主属组
[root@localhost ~]# chown -R omm:dbgroup /opt/openGauss
[root@localhost ~]# 
  1. 配置文件系统描述符
[root@localhost ~]# echo "* soft nofile 1000000" >>/etc/security/limits.conf
[root@localhost ~]# echo "* hard nofile 1000000" >>/etc/security/limits.conf
  1. 重启主机
[root@superman-21 opt]# reboot

4.3.2 单机主备安装

  1. 切换到omm用户
[root@superman-21 ~]# su - omm


Welcome to 5.10.0-60.18.0.50.oe2203.x86_64

System information as of time:  2023年 03月 20日 星期一 19:41:28 CST

System load:    0.00
Processes:      152
Memory used:    7.1%
Swap used:      0%
Usage On:       8%
IP address:     192.168.1.21
IP address:     192.168.122.1
Users online:   1
To run a command as administrator(user "root"),use "sudo <command>".
[omm@superman-21 ~]$ 
  1. 切换进入解压目录

进入解压后目录下的simpleInstall

[omm@superman-21 ~]$ cd /opt/openGauss/simpleInstall
[omm@superman-21 simpleInstall]$ 
  1. 执行install.sh脚本安装openGauss。
[omm@superman-21 simpleInstall]$ sh install.sh -w Gs.initdb --multinode
[step 1]: check parameter
[step 2]: check install env and os setting
[step 3]: change_gausshome_owner
[step 4]: set environment variables

[init primary datanode.]
The files belonging to this database system will be owned by user "omm".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default text search configuration will be set to "english".

creating directory /opt/openGauss/data/master ... ok
creating subdirectories ... in ordinary occasionok
creating configuration files ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1024MB
Begin init undo subsystem meta.
[INIT UNDO] Init undo subsystem meta successfully.
creating template1 database in /opt/openGauss/data/master/base/1 ... The core dump path is an invalid directory
2023-03-20 19:42:24.788 [unknown] [unknown] localhost 140601465792064 0[0:0#0]  [BACKEND] WARNING:  macAddr is 12/690964518, sysidentifier is 796975/1210464935, randomNum is 1248082599
ok
initializing pg_authid ... ok
setting password ... ok
initializing dependencies ... ok
loading PL/pgSQL server-side language ... ok
creating system views ... ok
creating performance views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
initialize global configure for bucketmap length ... ok
creating information schema ... ok
loading foreign-data wrapper for distfs access ... ok
loading foreign-data wrapper for log access ... ok
loading hstore extension ... ok
loading foreign-data wrapper for MOT access ... ok
loading security plugin ... ok
update system tables ... ok
creating snapshots catalog ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
freezing database template0 ... ok
freezing database template1 ... ok
freezing database postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run gs_initdb.

Success. You can now start the database server of single node using:

    gaussdb -D /opt/openGauss/data/master --single_node
or
    gs_ctl start -D /opt/openGauss/data/master -Z single_node -l logfile

[init slave datanode.]
The files belonging to this database system will be owned by user "omm".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default text search configuration will be set to "english".

creating directory /opt/openGauss/data/slave ... ok
creating subdirectories ... in ordinary occasionok
creating configuration files ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1024MB
Begin init undo subsystem meta.
[INIT UNDO] Init undo subsystem meta successfully.
creating template1 database in /opt/openGauss/data/slave/base/1 ... The core dump path is an invalid directory
2023-03-20 19:42:37.247 [unknown] [unknown] localhost 139910719841856 0[0:0#0]  [BACKEND] WARNING:  macAddr is 12/690964518, sysidentifier is 796975/1210488065, randomNum is 2473628929
ok
initializing pg_authid ... ok
setting password ... ok
initializing dependencies ... ok
loading PL/pgSQL server-side language ... ok
creating system views ... ok
creating performance views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
initialize global configure for bucketmap length ... ok
creating information schema ... ok
loading foreign-data wrapper for distfs access ... ok
loading foreign-data wrapper for log access ... ok
loading hstore extension ... ok
loading foreign-data wrapper for MOT access ... ok
loading security plugin ... ok
update system tables ... ok
creating snapshots catalog ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
freezing database template0 ... ok
freezing database template1 ... ok
freezing database postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run gs_initdb.

Success. You can now start the database server of single node using:

    gaussdb -D /opt/openGauss/data/slave --single_node
or
    gs_ctl start -D /opt/openGauss/data/slave -Z single_node -l logfile

[config datanode.]
remote_read_mode = non_authentication
host    all             all             192.168.1.21/32            trust
[start primary datanode.]
[2023-03-20 19:42:51.009][2280][][gs_ctl]: gs_ctl started,datadir is /opt/openGauss/data/master 
[2023-03-20 19:42:51.033][2280][][gs_ctl]: waiting for server to start...
.0 LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

0 LOG:  [Alarm Module]Host Name: superman-21 

0 LOG:  [Alarm Module]Host IP: superman-21. Copy hostname directly in case of taking 10s to use 'gethostbyname' when /etc/hosts does not contain <HOST IP>

0 LOG:  [Alarm Module]Cluster Name: dbCluster 

0 LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 57

0 WARNING:  failed to open feature control file, please check whether it exists: FileName=gaussdb.version, Errno=2, Errmessage=No such file or directory.
0 WARNING:  failed to parse feature control file: gaussdb.version.
0 WARNING:  Failed to load the product control file, so gaussdb cannot distinguish product version.
The core dump path is an invalid directory
2023-03-20 19:42:51.088 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  when starting as multi_standby mode, we couldn't support data replicaton.
gaussdb.state does not exist, and skipt setting since it is optional.2023-03-20 19:42:51.109 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

2023-03-20 19:42:51.109 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host Name: superman-21 

2023-03-20 19:42:51.109 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host IP: superman-21. Copy hostname directly in case of taking 10s to use 'gethostbyname' when /etc/hosts does not contain <HOST IP>

2023-03-20 19:42:51.109 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Cluster Name: dbCluster 

2023-03-20 19:42:51.109 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 57

2023-03-20 19:42:51.115 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  loaded library "security_plugin"
2023-03-20 19:42:51.119 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2023-03-20 19:42:51.119 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2023-03-20 19:42:51.119 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for backend threads is: 220 MB
2023-03-20 19:42:51.120 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for WAL buffers is: 128 MB
2023-03-20 19:42:51.120 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  Set max backend reserve memory is: 348 MB, max dynamic memory is: 8142 MB
2023-03-20 19:42:51.120 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  shared memory 3285 Mbytes, memory context 8490 Mbytes, max process memory 12288 Mbytes
2023-03-20 19:42:51.183 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [CACHE] LOG:  set data cache  size(402653184)
2023-03-20 19:42:51.237 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [SEGMENT_PAGE] LOG:  Segment-page constants: DF_MAP_SIZE: 8156, DF_MAP_BIT_CNT: 65248, DF_MAP_GROUP_EXTENTS: 4175872, IPBLOCK_SIZE: 8168, EXTENTS_PER_IPBLOCK: 1021, IPBLOCK_GROUP_SIZE: 4090, BMT_HEADER_LEVEL0_TOTAL_PAGES: 8323072, BktMapEntryNumberPerBlock: 2038, BktMapBlockNumber: 25, BktBitMaxMapCnt: 512
2023-03-20 19:42:51.259 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  gaussdb: fsync file "/opt/openGauss/data/master/gaussdb.state.temp" success
2023-03-20 19:42:51.259 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  create gaussdb state file success: db state(STARTING_STATE), server mode(Primary), connection index(1)
2023-03-20 19:42:51.284 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  max_safe_fds = 974, usable_fds = 1000, already_open = 16
The core dump path is an invalid directory
2023-03-20 19:42:51.286 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  user configure file is not found, it will be created.
2023-03-20 19:42:51.296 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  the configure file /opt/openGauss/etc/gscgroup_omm.cfg doesn't exist or the size of configure file has changed. Please create it by root user!
2023-03-20 19:42:51.296 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [BACKEND] LOG:  Failed to parse cgroup config file.
2023-03-20 19:42:51.321 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2023-03-20 19:42:51.321 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2023-03-20 19:42:51.321 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2023-03-20 19:42:51.321 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
2023-03-20 19:42:51.323 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2023-03-20 19:42:51.323 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2023-03-20 19:42:51.323 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2023-03-20 19:42:51.323 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
2023-03-20 19:42:51.324 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2023-03-20 19:42:51.324 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2023-03-20 19:42:51.324 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2023-03-20 19:42:51.324 [unknown] [unknown] localhost 140032436119104 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.

[2023-03-20 19:42:52.095][2280][][gs_ctl]:  done
[2023-03-20 19:42:52.095][2280][][gs_ctl]: server started (/opt/openGauss/data/master)
[build and start slave datanode.]
[2023-03-20 19:42:52.105][2351][][gs_ctl]: gs_ctl full build ,datadir is /opt/openGauss/data/slave
[2023-03-20 19:42:52.105][2351][][gs_ctl]: fopen build pid file "/opt/openGauss/data/slave/gs_build.pid" success
[2023-03-20 19:42:52.105][2351][][gs_ctl]: fprintf build pid file "/opt/openGauss/data/slave/gs_build.pid" success
[2023-03-20 19:42:52.106][2351][][gs_ctl]: fsync build pid file "/opt/openGauss/data/slave/gs_build.pid" success
[2023-03-20 19:42:52.106][2351][][gs_ctl]: stop failed, killing gaussdb by force ...
[2023-03-20 19:42:52.106][2351][][gs_ctl]: command [ps c -eo pid,euid,cmd | grep gaussdb | grep -v grep | awk '{if($2 == curuid && $1!="-n") print "/proc/"$1"/cwd"}' curuid=`id -u`| xargs ls -l | awk '{if ($NF=="/opt/openGauss/data/slave")  print $(NF-2)}' | awk -F/ '{print $3 }' | xargs kill -9 >/dev/null 2>&1 ] path: [/opt/openGauss/data/slave] 
[2023-03-20 19:42:52.174][2351][][gs_ctl]: server stopped
[2023-03-20 19:42:52.174][2351][][gs_ctl]: current workdir is (/opt/openGauss/simpleInstall).
[2023-03-20 19:42:52.175][2351][][gs_ctl]: set gaussdb state file when full build build:db state(BUILDING_STATE), server mode(STANDBY_MODE), build mode(FULL_BUILD).
[2023-03-20 19:42:52.176][2351][datanode2][gs_ctl]: Get repl_auth_mode is  and repl_uuid is 
[2023-03-20 19:42:52.181][2351][datanode2][gs_ctl]: build try host(192.168.1.21) port(5433) success
[2023-03-20 19:42:52.181][2351][datanode2][gs_ctl]: connected to server success, build started.
[2023-03-20 19:42:52.216][2351][datanode2][gs_ctl]: clear old target dir success
[2023-03-20 19:42:52.216][2351][datanode2][gs_ctl]: create build tag file success
[2023-03-20 19:42:52.216][2351][datanode2][gs_ctl]: create build tag file again success
[2023-03-20 19:42:52.217][2351][datanode2][gs_ctl]: get system identifier success
[2023-03-20 19:42:52.217][2351][datanode2][gs_ctl]: receiving and unpacking files...
[2023-03-20 19:42:52.217][2351][datanode2][gs_ctl]: create backup label success
INFO:  The starting position of the xlog copy of the full build is: 0/2382388. The slot minimum LSN is: 0/0. The disaster slot minimum LSN is: 0/0. The logical slot minimum LSN is: 0/0.
[2023-03-20 19:42:52.341][2351][datanode2][gs_ctl]: xlog start point: 0/2382388
[2023-03-20 19:42:52.341][2351][datanode2][gs_ctl]: begin build tablespace list
[2023-03-20 19:42:52.341][2351][datanode2][gs_ctl]: finish build tablespace list
[2023-03-20 19:42:52.341][2351][datanode2][gs_ctl]: begin get xlog by xlogstream
[2023-03-20 19:42:52.341][2351][datanode2][gs_ctl]: starting background WAL receiver
[2023-03-20 19:42:52.341][2351][datanode2][gs_ctl]: starting walreceiver
[2023-03-20 19:42:52.342][2351][datanode2][gs_ctl]: begin receive tar files
[2023-03-20 19:42:52.343][2351][datanode2][gs_ctl]: receiving and unpacking files...
[2023-03-20 19:42:52.399][2351][datanode2][gs_ctl]: build try host(192.168.1.21) port(5433) success
[2023-03-20 19:42:52.399][2351][datanode2][gs_ctl]: check identify system success
[2023-03-20 19:42:52.410][2351][datanode2][gs_ctl]: send START_REPLICATION 0/2000000 success
[2023-03-20 19:42:53.481][2351][datanode2][gs_ctl]: finish receive tar files
[2023-03-20 19:42:53.481][2351][datanode2][gs_ctl]: xlog end point: 0/3000058
[2023-03-20 19:42:53.481][2351][datanode2][gs_ctl]: fetching MOT checkpoint
gs_ctl: no mot checkpoint exists
[2023-03-20 19:42:53.481][2351][datanode2][gs_ctl]: waiting for background process to finish streaming...
[2023-03-20 19:42:57.693][2351][datanode2][gs_ctl]: starting fsync all files come from source.
[2023-03-20 19:42:59.077][2351][datanode2][gs_ctl]: finish fsync all files.
[2023-03-20 19:42:59.086][2351][datanode2][gs_ctl]: build dummy dw file success
[2023-03-20 19:42:59.086][2351][datanode2][gs_ctl]: rename build status file success
[2023-03-20 19:42:59.090][2351][datanode2][gs_ctl]: full build build completed(/opt/openGauss/data/slave).
[2023-03-20 19:42:59.114][2351][datanode2][gs_ctl]: waiting for server to start...
.0 LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

0 LOG:  [Alarm Module]Host Name: superman-21 

0 LOG:  [Alarm Module]Host IP: superman-21. Copy hostname directly in case of taking 10s to use 'gethostbyname' when /etc/hosts does not contain <HOST IP>

0 LOG:  [Alarm Module]Cluster Name: dbCluster 

0 LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 57

0 WARNING:  failed to open feature control file, please check whether it exists: FileName=gaussdb.version, Errno=2, Errmessage=No such file or directory.
0 WARNING:  failed to parse feature control file: gaussdb.version.
0 WARNING:  Failed to load the product control file, so gaussdb cannot distinguish product version.
The core dump path is an invalid directory
2023-03-20 19:42:59.167 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  when starting as multi_standby mode, we couldn't support data replicaton.
2023-03-20 19:42:59.178 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

2023-03-20 19:42:59.178 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host Name: superman-21 

2023-03-20 19:42:59.178 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host IP: superman-21. Copy hostname directly in case of taking 10s to use 'gethostbyname' when /etc/hosts does not contain <HOST IP>

2023-03-20 19:42:59.178 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Cluster Name: dbCluster 

2023-03-20 19:42:59.178 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 57

2023-03-20 19:42:59.184 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  loaded library "security_plugin"
2023-03-20 19:42:59.186 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2023-03-20 19:42:59.187 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2023-03-20 19:42:59.187 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for backend threads is: 220 MB
2023-03-20 19:42:59.187 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for WAL buffers is: 128 MB
2023-03-20 19:42:59.187 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  Set max backend reserve memory is: 348 MB, max dynamic memory is: 8142 MB
2023-03-20 19:42:59.187 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  shared memory 3285 Mbytes, memory context 8490 Mbytes, max process memory 12288 Mbytes
2023-03-20 19:42:59.256 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [CACHE] LOG:  set data cache  size(402653184)
2023-03-20 19:42:59.667 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [SEGMENT_PAGE] LOG:  Segment-page constants: DF_MAP_SIZE: 8156, DF_MAP_BIT_CNT: 65248, DF_MAP_GROUP_EXTENTS: 4175872, IPBLOCK_SIZE: 8168, EXTENTS_PER_IPBLOCK: 1021, IPBLOCK_GROUP_SIZE: 4090, BMT_HEADER_LEVEL0_TOTAL_PAGES: 8323072, BktMapEntryNumberPerBlock: 2038, BktMapBlockNumber: 25, BktBitMaxMapCnt: 512
2023-03-20 19:43:00.047 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  gaussdb: fsync file "/opt/openGauss/data/slave/gaussdb.state.temp" success
2023-03-20 19:43:00.048 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  create gaussdb state file success: db state(STARTING_STATE), server mode(Standby), connection index(1)
2023-03-20 19:43:00.072 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  max_safe_fds = 972, usable_fds = 1000, already_open = 18
The core dump path is an invalid directory
2023-03-20 19:43:00.102 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  the configure file /opt/openGauss/etc/gscgroup_omm.cfg doesn't exist or the size of configure file has changed. Please create it by root user!
2023-03-20 19:43:00.102 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [BACKEND] LOG:  Failed to parse cgroup config file.
2023-03-20 19:43:00.334 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2023-03-20 19:43:00.334 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2023-03-20 19:43:00.334 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2023-03-20 19:43:00.334 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
2023-03-20 19:43:00.354 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2023-03-20 19:43:00.354 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2023-03-20 19:43:00.354 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2023-03-20 19:43:00.354 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
2023-03-20 19:43:00.355 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2023-03-20 19:43:00.355 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2023-03-20 19:43:00.355 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2023-03-20 19:43:00.355 [unknown] [unknown] localhost 139794361550400 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
....
[2023-03-20 19:43:04.844][2351][datanode2][gs_ctl]:  done
[2023-03-20 19:43:04.844][2351][datanode2][gs_ctl]: server started (/opt/openGauss/data/slave)
[2023-03-20 19:43:04.844][2351][datanode2][gs_ctl]: fopen build pid file "/opt/openGauss/data/slave/gs_build.pid" success
[2023-03-20 19:43:04.844][2351][datanode2][gs_ctl]: fprintf build pid file "/opt/openGauss/data/slave/gs_build.pid" success
[2023-03-20 19:43:04.850][2351][datanode2][gs_ctl]: fsync build pid file "/opt/openGauss/data/slave/gs_build.pid" success
import sql file
Would you like to create a demo database (yes/no)? yes
Load demoDB [school,finance] success.
[complete successfully]: You can start or stop the database server using:
    primary: gs_ctl start|stop|restart -D $GAUSSHOME/data/master -M primary
    standby: gs_ctl start|stop|restart -D $GAUSSHOME/data/slave -M standby

[omm@superman-21 simpleInstall]$ 

上述命令中:

-w:初始化数据库密码(Gs.initdb指定),安全需要必须设置。
-p:指定的openGauss主节点端口号,默认5432。备节点端口号会使用主端口号+200,默认5632。
–multinode:用来区分是单节点还是一主一备安装。

如果安装报错:gs_initdb: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory。

解决方法(root用户执行):

[root@superman-21 ~]# cd /usr/lib64
[root@superman-21 lib64]# 
[root@superman-21 lib64]# ls libreadline*
libreadline.so.8  libreadline.so.8.1
[root@superman-21 lib64]# 
[root@superman-21 lib64]# ln -s libreadline.so.8 libreadline.so.7
[root@superman-21 lib64]# 
[root@superman-21 lib64]# ll libreadline*
lrwxrwxrwx. 1 root root   16  317 22:49 libreadline.so.7 -> libreadline.so.8
lrwxrwxrwx. 1 root root   18 1127  2021 libreadline.so.8 -> libreadline.so.8.1
-rwxr-xr-x. 1 root root 336K 1127  2021 libreadline.so.8.1
[root@superman-21 lib64]#

4.3.3 安装后检查

安装执行完成后,使用ps和gs_ctl查看进程是否正常。

执行ps命令,显示类似如下信息:

[omm@superman-21 simpleInstall]$ ps ux | grep gaussdb
omm         2283  2.1 23.5 5931644 815648 ?      Ssl  19:42   0:16 /opt/openGauss/bin/gaussdb -D /opt/openGauss/data/master -M primary
omm         2372  2.6 17.5 6139468 606204 ?      Ssl  19:42   0:20 /opt/openGauss/bin/gaussdb -D /opt/openGauss/data/slave -M standby
omm         3275  0.0  0.0   6608  2228 pts/0    S+   19:55   0:00 grep --color=auto gaussdb
[omm@superman-21 simpleInstall]$ 

执行gs_ctl命令,显示类似如下信息:

[omm@superman-21 simpleInstall]$ gs_ctl query -D $GAUSSHOME/data/master -M primary
[2023-03-21 07:15:10.206][2721][][gs_ctl]: gs_ctl query ,datadir is /opt/openGauss/data/master 
 HA state:           
        local_role                     : Primary
        static_connections             : 1
        db_state                       : Normal
        detail_information             : Normal

 Senders info:       
        sender_pid                     : 2539
        local_role                     : Primary
        peer_role                      : Standby
        peer_state                     : Normal
        state                          : Streaming
        sender_sent_location           : 0/403BEF8
        sender_write_location          : 0/403BEF8
        sender_flush_location          : 0/403BEF8
        sender_replay_location         : 0/403BEF8
        receiver_received_location     : 0/403BEF8
        receiver_write_location        : 0/403BEF8
        receiver_flush_location        : 0/403BEF8
        receiver_replay_location       : 0/403BEF8
        sync_percent                   : 100%
        sync_state                     : Sync
        sync_priority                  : 1
        sync_most_available            : Off
        channel                        : 192.168.1.21:5433-->192.168.1.21:41908

 Receiver info:      
No information 
[omm@superman-21 simpleInstall]$ 
[omm@superman-21 simpleInstall]$ gs_ctl query -D $GAUSSHOME/data/slave -M standby 
[2023-03-21 07:15:17.082][2732][][gs_ctl]: gs_ctl query ,datadir is /opt/openGauss/data/slave 
 HA state:           
        local_role                     : Standby
        static_connections             : 1
        db_state                       : Normal
        detail_information             : Normal

 Senders info:       
No information 
 Receiver info:      
        receiver_pid                   : 2538
        local_role                     : Standby
        peer_role                      : Primary
        peer_state                     : Normal
        state                          : Normal
        sender_sent_location           : 0/403BEF8
        sender_write_location          : 0/403BEF8
        sender_flush_location          : 0/403BEF8
        sender_replay_location         : 0/403BEF8
        receiver_received_location     : 0/403BEF8
        receiver_write_location        : 0/403BEF8
        receiver_flush_location        : 0/403BEF8
        receiver_replay_location       : 0/403BEF8
        sync_percent                   : 100%
        channel                        : 192.168.1.21:41908<--192.168.1.21:5433

[omm@superman-21 simpleInstall]$ 

4.3.4 服务启停

  1. primary
$ gs_ctl start|stop|restart -D $GAUSSHOME/data/master -M primary
  1. standby
$ gs_ctl start|stop|restart -D $GAUSSHOME/data/slave -M standby

👍 点赞,你的认可是我创作的动力!

⭐️ 收藏,你的青睐是我努力的方向!

✏️ 评论,你的意见是我进步的财富!

在这里插入图片描述

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

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

相关文章

【网络安全带你练爬虫-100练】第11练:xpath快速定位提取数据

目录 一、目标1&#xff1a;使用etree解析数据 二、目标2&#xff1a;使用xpath爬取指定数据 三、目标3&#xff1a;提取指定数据 四、网络安全小圈子 一、目标1&#xff1a;使用etree解析数据 其余的不用过多介绍&#xff0c;前面的练习都给大家已经过了一遍 def get_page…

【沐风老师】3DMAX砖石墙地面生成工具插件使用方法详解

3dMax砖石墙地面生成工具插件&#xff0c;收集了一些用于创建石墙、石头路面和不规则石头图案的实用工具&#xff0c;以模拟墙壁和地面。脚本会自动烘焙法线贴图、AO贴图和高度贴图以供实时使用。 【主要特点】 1.可以生成真实的石墙、地面、不规则石块及石灰墙面&#xff0c;是…

4.5 x64dbg 探索钩子劫持技术

钩子劫持技术是计算机编程中的一种技术&#xff0c;它们可以让开发者拦截系统函数或应用程序函数的调用&#xff0c;并在函数调用前或调用后执行自定义代码&#xff0c;钩子劫持技术通常用于病毒和恶意软件&#xff0c;也可以让开发者扩展或修改系统函数的功能&#xff0c;从而…

oracle启动/关闭/查看监听+启动/关闭/查看数据库实例命令

启动oracle第一步启动监听&#xff0c;第二步启动数据库实例 &#xff08;1&#xff09;输入su oracle进入oracle用户状态 &#xff08;2&#xff09;这里的密码是你的root密码 1 启动/关闭/查看监听命令 &#xff08;1&#xff09;启动监听—— lsnrctl start &am…

C#学习之路-封装

封装 被定义为"把一个或多个项目封闭在一个物理的或者逻辑的包中"。在面向对象程序设计方法论中&#xff0c;封装是为了防止对实现细节的访问。 抽象和封装是面向对象程序设计的相关特性。抽象允许相关信息可视化&#xff0c;封装则使开发者实现所需级别的抽象。 C…

编码和调制

编码与调制 消息是以二进制的形式存放在数据当中的&#xff0c;这种数据的表现形式是信号&#xff0c;而信源发出的原始信号就叫做基带信号&#xff0c;基带信号又可以分为数字基带信号和模拟基带信号。 信号需要在信道中进行传输&#xff0c;信道分为模拟信道和数字信…

libdrm编译调试

本文主要介绍libdrm的代码下载、编译和调试的工作。新版本的libdrm不再采用configure && make的方式编译&#xff0c;而是改用meson && ninja编译方式&#xff0c;近些年很多多媒体的开源软件包的构建系统有向后者靠拢的趋势&#xff0c;典型的比如gstream及其…

16、SQL注入之查询方式及报错盲注

目录 前言SQL注入报错盲注补充: Access暴力猜解不出的问题? 前言 当进行SQL注入时&#xff0c;有很多注入会出现无回显的情况&#xff0c;其中不回显的原因可能是SQL语句查询方式的问题导致&#xff0c;这个时候我们需要用到相关的报错或盲注进行后续操作&#xff0c;同时作为…

进程间通信的介绍

目录 进程间通信的目的 进程间通信发展 进程间通信分类 进程间通信的分析 进程间通信的目的 数据传输&#xff1a;一个进程需要将它的数据发送给另一个进程资源共享&#xff1a;多个进程之间共享同样的资源。通知事件&#xff1a;一个进程需要向另一个或一组进程发送消息&a…

PWM+RC 滤波的DAC 输出的数学理论

PWM示意图 PWM 本质上其实就是一种周期一定&#xff0c;占空比可调的方波。典型PWM 波形如下 图所示&#xff1a; PWM分段函数 图中的PWM 波形可以用如下分段函数表示&#xff1a; 函数中&#xff1a;T 是单片机中计数脉冲的基本周期&#xff0c;也就是STM32F4 定时器的计数频率…

Couldn‘t find a tree builder with the features you requested: lxml

这是一个常见于Python爬虫代码的报错。 报错原因&#xff1a;BeautifulSoup的解析方法之一&#xff0c;xml&#xff0c;需要安装好lxml库才行 解决办法&#xff1a;安装 lxml 库即可。 pip install lxml 安装好之后&#xff0c;BeautifulSoup就能正常解析了。 然后&#xff…

RabbitMQ系列(26)--RabbitMQ实现高可用负载均衡

前言&#xff1a;我们以往只能连接一个指定的队列&#xff0c;不能自由地连接其他的队列&#xff0c;当我们连接的那个指定队列宕机了&#xff0c;生产者和消费者都没办法往队列发送消息和消费消息&#xff0c;而且生产者和消费者也不能自动的连接到其他正常运行的队列&#xf…

嵌入式开发--XW09A触摸芯片的使用

XW09A触摸芯片 XW09A是厦门市芯网电子科技有限公司出品的一颗触摸芯片&#xff0c;支持9键多点触摸&#xff0c;I2C接口&#xff0c;带中断引脚。 以下摘抄自芯片手册 极高的灵敏度&#xff0c;可穿透13mm 的玻璃&#xff0c;感应到手指的触摸 超强的抗干扰和ESD 能力,不加任何…

设计模式-迪米特法则

代码世界中类间的耦合关系会直接影响代码可复用性、可读性、可扩展性等。这种耦合关系就如同人之间朋友关系一样&#xff0c;志不同道不合不应相于谋&#xff0c;否则最终只会落得个互相伤害的下场。代码组织时也应如此&#xff0c;应按照一定的原则处理好类之间的关系&#xf…

C++常用库函数 3.数据转换函数

函数名&#xff1a;abs 函数原型&#xff1a;int abs(int n)&#xff1b; 参数&#xff1a;n 整数值。 所需头文件&#xff1a;<cstdlib> 功能&#xff1a;求绝对值。 返回值&#xff1a;返回 n 的绝对值。函数名&#xff1a;atof&#xff0c;atoi&#xff0c;atol …

第42节:cesium 火焰效果(含源码+视频)

结果示例: 完整源码: <template><div class="viewer"><!-- :shouldAnimate="true" 添加动画 --><vc-viewer @ready

linux 命令之find

find 命令 1. 作用 命令用于在指定目录下以及其子母路查找文件和目录。 2. 语法 find [path] [expression] 不指定path的默认为当前路径 2.1 常见的参数 -name pattern&#xff1a;按文件名查找&#xff0c;支持使用通配符 * 和 ?。 -type type&#xff1a;按文件类型查…

NVIC的中断挂起寄存器和EXTI的中断挂起寄存器的区别

&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;仅个人拙见&#xff0c;若有错误&#xff0c;欢迎大家指正&#xff0…

Spring MVC 程序开发

什么是 Spring MVC&#xff1f; 官⽅对于 Spring MVC 的描述是这样的&#xff1a; Spring Web MVC is the original web framework built on the Servlet API and has been included in the Spring Framework from the very beginning. The formal name, “Spring Web MVC,”…

数据特征降维 | 核主元分析KPCA数据降维

文章目录 效果一览文章概述部分源码部分源码参考资料效果一览 文章概述 数据特征降维 | 核主元分析KPCA,主要用于数据降维。 部分源码 部分源码 %% 清空环境变量 warning off % 关闭报警信息 close all % 关闭开启的图窗 clear …