openGauss学习笔记-03 openGauss极简版单节点安装

news2024/11/15 22:59:24

文章目录

    • openGauss学习笔记-03 openGauss极简版单节点安装
      • 3.1 获取安装包
        • 3.1.1 下载对应平台的安装包
        • 3.1.2 解压安装包
        • 3.1.3 查看目录结构
      • 3.2 准备软硬件安装环境
        • 3.2.1 硬件环境要求
        • 3.2.2 软件环境要求
        • 3.2.3 软件依赖要求
      • 3.3 单节点安装
        • 3.3.1 安装前准备
        • 3.3.2 安装openGauss
        • 3.3.3 安装后检查

openGauss学习笔记-03 openGauss极简版单节点安装

openGauss支持以脚本方式进行极简安装,极简安装包括单节点安装和一主一备节点安装。

3.1 获取安装包

3.1.1 下载对应平台的安装包

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

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

image-20230317214331191

  1. 单击“立即下载”。

image-20230317214403635

3.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/
.
.
.
tar: ./share/postgresql/postgresql.conf.sample:时间戳 2023-01-06 09:36:25 是未来的 3241974.33647889 秒之后
tar: ./share/postgresql/performance_views.sql:时间戳 2023-01-06 09:36:20 是未来的 3241969.329454592 秒之后
tar: ./share/postgresql/snowball_create.sql:时间戳 2023-01-06 09:36:29 是未来的 3241978.329262687 秒之后
tar: ./share/postgresql/pg_cast_oid.txt:时间戳 2023-01-06 09:36:20 是未来的 3241969.329202685 秒之后
tar: ./share/postgresql/tmp/udstools.py:时间戳 2023-01-06 09:36:25 是未来的 3241974.329119449 秒之后
tar: ./share/postgresql/tmp:时间戳 2023-01-06 09:39:10 是未来的 3242139.329099462 秒之后
tar: ./share/postgresql:时间戳 2023-01-06 09:39:11 是未来的 3242140.329066682 秒之后
tar: ./share/llvmir/GaussDB_expr.ir:时间戳 2023-01-06 09:36:20 是未来的 3241969.328677367 秒之后
tar: ./share/llvmir:时间戳 2023-01-06 09:39:12 是未来的 3242141.328643249 秒之后
tar: ./share:时间戳 2023-01-06 09:39:11 是未来的 3242140.328618308 秒之后
tar: ./simpleInstall/finance.sql:时间戳 2023-01-06 09:39:13 是未来的 3242142.328535652 秒之后
tar: ./simpleInstall/README.md:时间戳 2023-01-06 09:39:13 是未来的 3242142.328477377 秒之后
tar: ./simpleInstall/school.sql:时间戳 2023-01-06 09:39:13 是未来的 3242142.328415969 秒之后
tar: ./simpleInstall/install.sh:时间戳 2023-01-06 09:39:13 是未来的 3242142.327986469 秒之后
tar: ./simpleInstall:时间戳 2023-01-06 09:39:13 是未来的 3242142.32793454 秒之后
tar: ./version.cfg:时间戳 2023-01-06 09:39:13 是未来的 3242142.32787418 秒之后
[root@localhost opt]#

3.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]# 

3.2 准备软硬件安装环境

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

3.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的配置方法在本节中不做介绍。请参考硬件厂商的手册或互联网上的方法进行配置。

3.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

3.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不存在这个包,不影响后续安装数据库。

3.3 单节点安装

3.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 gaussdb1
[root@localhost ~]# echo "192.168.0.21    gaussdb1" >>/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@gaussdb1 ~]# chown -R omm:dbgroup /opt/openGauss
[root@gaussdb1 ~]# 
  1. 配置文件系统描述符
[root@localhost ~]# echo "* soft nofile 1000000" >>/etc/security/limits.conf
[root@localhost ~]# echo "* hard nofile 1000000" >>/etc/security/limits.conf
  1. 重启主机
[root@gaussdb1 opt]# reboot

3.3.2 安装openGauss

  1. 切换到omm用户
[root@gaussdb1 ~]# su - omm
上一次登录: 五 317 22:29:56 CST 2023 pts/0 上


Welcome to 5.10.0-60.18.0.50.oe2203.x86_64

System information as of time:  2023年 03月 17日 星期五 22:33:56 CST

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

进入解压后目录下的simpleInstall

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

[step 6]: init 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 database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

creating directory /opt/openGauss/data/single_node ... 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/single_node/base/1 ... The core dump path is an invalid directory
2023-03-18 00:12:25.778 [unknown] [unknown] localhost 140147207374400 0[0:0#0]  [BACKEND] WARNING:  macAddr is 12/690964518, sysidentifier is 796975/1210449937, randomNum is 2522021905
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/single_node --single_node
or
    gs_ctl start -D /opt/openGauss/data/single_node -Z single_node -l logfile

[step 7]: start datanode
[2023-03-18 00:12:37.321][2266][][gs_ctl]: gs_ctl started,datadir is /opt/openGauss/data/single_node 
[2023-03-18 00:12:37.343][2266][][gs_ctl]: waiting for server to start...
.0 LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

0 LOG:  [Alarm Module]Host Name: gaussdb1 

0 LOG:  [Alarm Module]Host IP: gaussdb1. 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-18 00:12:37.399 [unknown] [unknown] localhost 139709877147200 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-18 00:12:37.409 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.

2023-03-18 00:12:37.409 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host Name: gaussdb1 

2023-03-18 00:12:37.409 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host IP: gaussdb1. Copy hostname directly in case of taking 10s to use 'gethostbyname' when /etc/hosts does not contain <HOST IP>

2023-03-18 00:12:37.409 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Cluster Name: dbCluster 

2023-03-18 00:12:37.409 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 57

2023-03-18 00:12:37.415 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  loaded library "security_plugin"
2023-03-18 00:12:37.417 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2023-03-18 00:12:37.417 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2023-03-18 00:12:37.420 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] WARNING:  No explicit IP is configured for listen_addresses GUC.
2023-03-18 00:12:37.420 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2023-03-18 00:12:37.420 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for backend threads is: 220 MB
2023-03-18 00:12:37.420 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for WAL buffers is: 128 MB
2023-03-18 00:12:37.420 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  Set max backend reserve memory is: 348 MB, max dynamic memory is: 8142 MB
2023-03-18 00:12:37.420 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  shared memory 3285 Mbytes, memory context 8490 Mbytes, max process memory 12288 Mbytes
2023-03-18 00:12:37.484 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [CACHE] LOG:  set data cache  size(402653184)
2023-03-18 00:12:37.531 [unknown] [unknown] localhost 139709877147200 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-18 00:12:37.555 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  gaussdb: fsync file "/opt/openGauss/data/single_node/gaussdb.state.temp" success
2023-03-18 00:12:37.555 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  create gaussdb state file success: db state(STARTING_STATE), server mode(Normal), connection index(1)
2023-03-18 00:12:37.581 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  max_safe_fds = 976, usable_fds = 1000, already_open = 14
The core dump path is an invalid directory
2023-03-18 00:12:37.584 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  user configure file is not found, it will be created.
2023-03-18 00:12:37.591 [unknown] [unknown] localhost 139709877147200 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-18 00:12:37.591 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [BACKEND] LOG:  Failed to parse cgroup config file.
2023-03-18 00:12:37.625 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2023-03-18 00:12:37.625 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2023-03-18 00:12:37.625 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2023-03-18 00:12:37.625 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
2023-03-18 00:12:37.628 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2023-03-18 00:12:37.629 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2023-03-18 00:12:37.629 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2023-03-18 00:12:37.629 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
2023-03-18 00:12:37.630 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2023-03-18 00:12:37.630 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2023-03-18 00:12:37.630 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2023-03-18 00:12:37.630 [unknown] [unknown] localhost 139709877147200 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.

[2023-03-18 00:12:38.630][2266][][gs_ctl]:  done
[2023-03-18 00:12:38.630][2266][][gs_ctl]: server started (/opt/openGauss/data/single_node)
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:
    gs_ctl start|stop|restart -D $GAUSSHOME/data/single_node -Z single_node

[omm@gaussdb1 simpleInstall]$ 

上述命令中,-w是指初始化数据库密码(gs_initdb),安全需要必须设置。

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

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

[root@gaussdb1 ~]# cd /usr/lib64
[root@gaussdb1 lib64]# 
[root@gaussdb1 lib64]# ls libreadline*
libreadline.so.8  libreadline.so.8.1
[root@gaussdb1 lib64]# 
[root@gaussdb1 lib64]# ln -s libreadline.so.8 libreadline.so.7
[root@gaussdb1 lib64]# 
[root@gaussdb1 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@gaussdb1 lib64]#

3.3.3 安装后检查

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

  1. ps检查
$ ps ux | grep gaussdb

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

[omm@gaussdb1 simpleInstall]$ ps ux | grep gaussdb
omm         2358  9.3 21.8 5767796 758068 ?      Ssl  23:09   0:23 /opt/openGauss/bin/gaussdb -D /opt/openGauss/data/single_node
omm         2704  0.0  0.0   6352  2188 pts/0    S+   23:13   0:00 grep --color=auto gaussdb
[omm@gaussdb1 simpleInstall]$ 
  1. gs_ctl检查
$ gs_ctl query -D $GAUSSHOME/data/master -M primary
$ gs_ctl query -D $GAUSSHOME/data/master -M standby

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

[omm@gaussdb1 simpleInstall]$ gs_ctl query -D /opt/openGauss/data/single_node        
[2023-03-17 23:16:55.609][2917][][gs_ctl]: gs_ctl query ,datadir is /opt/openGauss/data/single_node 
 HA state:           
        local_role                     : Normal
        static_connections             : 0
        db_state                       : Normal
        detail_information             : Normal

 Senders info:       
No information 
 Receiver info:      
No information 
[omm@gaussdb1 simpleInstall]$ 

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

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

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

图片

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

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

相关文章

硬件电路设计--运算放大器(四)应用三比较器

文章目录 前言电压比较器一、过零比较器二、单门比较器三、滞回比较器&#xff08;施密特触发器&#xff09;四、窗口比较器五、未使用的比较器的处理六、推挽式输出或漏极开路输出开漏输出推挽输出 七、比较器的应用7.1 3V转5V7.2 双极性转单极性7.3 光敏电阻模数转换 八、比较…

互联网协议(Internet Protocol Suite)

文章目录&#xff1a; 一&#xff1a;从系统角度&#xff08;解释互联网是如何构成的&#xff0c;协议的设计思想&#xff09; 二&#xff1a;从用户的角度&#xff08;解释结构是如何发挥作用&#xff0c;完成网络数据交换的&#xff09; 参考&#xff1a;阮一峰 一&#x…

过滤器与拦截器的区别

1.运行顺序不同 过滤器是在客户端请求到达服务器&#xff0c;但还未到Servlet时运行的&#xff0c;而拦截器是在到达Servelt后&#xff0c;调用适配器(HandlerAdapter)前运行的。 2.配置方式不同 过滤器是在web.xml中配置&#xff0c;而拦截器是在Spring中的配置文件中配置&a…

mysql练习----单表查询

环境&#xff1a; 目录 第一题 第二题 第三题 第一题 --创建如下学生表 create table student( id int, name varchar(20), gender varchar(20), chinese int, math int, english int ); insert into student values (1,张明,男,89,78,90), (2,李进,男,67,53,95), (3,王…

Liunx下线程互斥与同步

文章目录 前言1.线程相关问题2.加锁操作1.相关接口2.加锁原理 3.线程安全4.线程同步 前言 本文主要围绕Linux下线程互斥问题进行相关讲解&#xff0c;同时也会线程同步相关问题。 1.线程相关问题 我们知道进程地址空间很多资源是被线程共享的。线程在并发访问这些共享资源的时…

代码随想录day11

20. 有效的括号 思路&#xff1a;这里用模拟栈的方法会更好理解&#xff0c;也就是我们每次遇到朝左方向的三种类型的时候&#xff0c;就加入相反方向的右括号到result栈中。由于栈是一个先进后出的方式&#xff0c;所以我们会有一个判断stack当前为不为空&#xff0c;和stack[…

4G理论概述

文章目录 LTE网络基础架构UMTS&#xff08;通用移动通信系统&#xff0c;Universal Mobile Telecommunications System&#xff09;UTRAN&#xff08;UMTS陆地无线接入网&#xff0c;UMTS Terrestrial Radio Access Network&#xff09;RNC&#xff08;无线网络控制器&#xff…

Vue的响应式实现思路及源码分析

Vue # 思路 new Vue() 首先执行初始化,对 data 执行响应化处理,这个过程发生在 Observer 中同时对模板执行编译,找到其中动态绑定的数据,从 data 中获取并初始化视图,这个过程发生在 compile 中同时定义一个 更新函数 和 Watcher,将来对应数据变化时 Watcher 会调用 更新…

python编程——字符串讲解

作者&#xff1a;Insist-- 个人主页&#xff1a;insist--个人主页 本文专栏&#xff1a;python专栏 专栏介绍&#xff1a;本专栏为免费专栏&#xff0c;并且会持续更新python基础知识&#xff0c;欢迎各位订阅关注。 前言 本文将介绍python字符串是什么&#xff1f;以及它的几…

C++11(一)(列表初始化,变量类型推导(auto,decltype),nullptr,范围for循环等)

目录 C11简介 列表初始化 C98中,{}的初始化问题 内置类型的列表初始化 自定义类型的列表初始化 变量类型推导 auto decltype nullptr 范围for循环 final和override 默认成员函数的控制 显式缺省函数 删除默认函数 C11简介 在2003年C标准委员会曾经提交了一份技…

STM32F767-0-HAL库主从定时器产生固定数量的PWM

STM32F767-0-主从定时器产生固定数量的PWM 前言一、配置STM32F767主从定时器的详细步骤1.1 选择主定时器和从定时器&#xff1a;1.2 配置主定时器&#xff08;主从模式&#xff09;&#xff1a;1.2.1 设置主定时器的时钟源&#xff1a;1.2.2 配置主定时器的分频系数&#xff1a…

不同路径(力扣)动态规划 JAVA

一个机器人位于一个 m x n 网格的左上角 &#xff08;起始点在下图中标记为 “Start” &#xff09;。 机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角&#xff08;在下图中标记为 “Finish” &#xff09;。 问总共有多少条不同的路径&#xff1f; 示例 1&a…

JWT的简单说明与使用

简要 JWT是"JSON Web Token"的缩写&#xff0c;是一种用于在不同系统之间传输信息的开放标准。它通过将信息进行加密后生成一个安全的令牌&#xff0c;以便在网络请求中进行身份验证和授权。 具体来说&#xff0c;JWT可以用于以下几个方面&#xff1a; 身份验证&…

CMakeLists.txt 语法介绍

CMake编译原理 CMake是一种跨平台编译工具,主要编写CMakeLists.txt文件,然后用cmake命令将CMakeLists.txt文件转化为make所需要的makefile文件&#xff0c;最后用make命令编译源码生成可执行程序或共享库.因此CMake的编译基本就两个步骤&#xff1a;cmake && make cm…

MySQL基础练习

Ⅰ Ⅱ 3.1 3.2 3.3 3.4 -- 单表查询练习 /* 素材 CREATE TABLE emp ( empno int(4) NOT NULL, ename varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, job varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, …

细数那些Compose新手容易犯的错误

作者&#xff1a;晴天小庭 笔者作为一个日常Jetpack Compose开发者&#xff0c;对Compose的理解也在逐渐加深中&#xff0c;最近回顾当初学习和实践的过程中&#xff0c;犯了不少错误和踩了很多坑&#xff0c;本篇文章作为小总结分享给大家&#xff0c;同时文章会持续更新&…

Leetcode-每日一题【1669.合并两个链表】

题目 给你两个链表 list1 和 list2 &#xff0c;它们包含的元素分别为 n 个和 m 个。 请你将 list1 中下标从 a 到 b 的全部节点都删除&#xff0c;并将list2 接在被删除节点的位置。 下图中蓝色边和节点展示了操作后的结果&#xff1a; 请你返回结果链表的头指针。 示例 1…

Unity游戏C# dll注入

案例游戏下载 首先在网上下载个游戏案例&#xff0c;我就以Captain Molly游戏为例。 这个游戏玩家默认生命值有5点&#xff0c;咱们通过dll注入修改为10点。 dnSpy 我使用dnSpy来查看Unity游戏生成的dll代码&#xff0c;当然你们也可以使用其他工具。 Unity游戏脚本代码最终…

Codeforces-Round-883-Div-3

Codeforces Round 883 (Div. 3) 链接&#xff1a;https://codeforces.com/contest/1846 A. Rudolph and Cut the Rope There are n n n nails driven into the wall, the i i i-th nail is driven a i a_i ai​ meters above the ground, one end of the b i b_i bi​ m…