返回首页

gbase数据、南大通用产品文档:GBase8c

更新日期:2024年09月11日

local_bind_address
参数说明:声明当前节点连接GBase 8c 其他节点绑定的本地IP 地址。
该参数属于POSTMASTER 类型参数,请参考表15-15-1 中对应设置方法进行设置。
默认值:数据库实例安装好后,根据XML 配置文件中不同实例的IP 地址配置不同默
认值。DN 的默认参数值为:local_bind_address = 'x.x.x.x'。

同步系统时间
GBase 8c 分布式数据库系统,需要各节点间时间同步,来保证数据库一致性。一般采
用NTP 服务方式来保证各节点间的时间同步。检查和配置NTP 服务的操作步骤如下:
步骤1 首先检查服务器是否安装NTP 服务以及是否正常运行:
[gbase@gbase8c ~]$ sudo systemctl status ntpd.service
ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset:
disabled)
Active: active (running) since Thu 2021-12-02 19:26:50 CST; 1 weeks 1 days ago
Main PID: 14440 (ntpd)
CGroup: /system.slice/ntpd.service
└─14440 /usr/sbin/ntpd -u ntp:ntp -g
如果显示running,则表示服务正在运行,则跳过步骤2,直接执行后续步骤。

GBase 8c V5 安装部署手册(分布式)
南大通用数据技术股份有限公司
13
步骤2 如NTP 服务未处于正常运行状态,考虑如下操作:

如果系统可以与外网通信,可以使用如下命令与NTP 服务器同步:
[gbase@gbase8c ~]$ sudo ntpdate asia.pool.ntp.org

如果服务器所在网络无法与外网通信,需要手动配置NTP 服务:
首先确认是否安装ntp:
[gbase@gbase8c ~]$ rpm -qa|grep ntp
若已安装ntp 应返回如下内容:
[gbase@gbase8c ~]$ ntp-4.2.6p5-29.el7.centos.x86_64
[gbase@gbase8c ~]$ ntpdate-4.2.6p5-29.el7.centos.x86_64
若没有ntp 显示,则应删除原有ntpdate 后重新安装ntp:
[gbase@gbase8c ~]$ sudo yum -y remove ntpdate-4.2.6p5-29.el7.centos.x86_64
[gbase@gbase8c ~]$ sudo yum -y install ntp
步骤4 配置NTP 服务。
安装完毕后,在所有节点上配置NTP 服务。选定NTP 服务主节点,一般选用主GTM
节点作为NTP 主节点。
NTP 节点配置通过修改/etc 目录下的ntp.conf 配置文件实现,
分为主
节点配置及其他节点配置。
修改各节点上ntp.conf 配置文件,命令如下:
[gbase@gbase8c ~]$ sudo vi /etc/ntp.conf

主节点修改配置文件,涉及部分配置文件及修改位置如下:
# Permit all access over the loopback interface.
This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 10.0.7.16 nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
# Hosts on local network are less restricted.
restrict 10.0.7.255 mask 255.255.248.0 nomodify notrap
# Use public servers from the pool.ntp.org project.

GBase 8c V5 安装部署手册(分布式)
南大通用数据技术股份有限公司
14
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# 注释掉以下四行
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server 127.127.1.0
Fudge 127.127.1.0 stratum 10

NTP 其他节点修改配置文件,修改涉及部分配置文件及修改位置如下:
# the administrative functions.
restrict 10.0.7.17 nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
# Hosts on local network are less restricted.
restrict 10.0.7.255 mask 255.255.248.0 nomodify notrap
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# 注释掉以下四行
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server 10.0.7.16
Fudge 10.0.7.16 stratum 10
步骤5 启动NTP 服务,并设置开机自启动。
全部节点配置完成后,在所有节点启动NTP 服务。
[gbase@gbase8c ~]$ sudo systemctl start ntpd.service
设置开机自启动:
[gbase@gbase8c ~]$ sudo systemctl enable ntpd.service
注意

某些虚拟机环境下无法配置NTP 开机自启动,需要每次重启后进行手工启动。

时间同步会影响数据库集群部署及一致性操作,须提前配置生效。

GBase 8c V5 安装部署手册(分布式)
南大通用数据技术股份有限公司
15
步骤6 配置完毕后,在各节点执行以下命令,查看NTP 服务是否连通。
[gbase@gbase8c ~]$ ntpstat
NTP 主节点应返回:
synchronised to local net (127.127.1.0) at stratum 6
time correct to within 11 ms
polling server every 64 s
NTP 其他节点应返回:
synchronised to NTP server (10.0.7.16) at stratum 7
time correct to within 57 ms
polling server every 1024 s
注意
NTP 服务器配置完毕后,需要等待5~20 分钟才能完成时间同步,如果在配置后提示
unsynchronised time server re-starting polling server every 8 s 或unsynchronised polling
server every 8 s 均属正常,等待一段时间再次执行ntpstat 命令查看即可。

GS_COLUMN_KEYS 系统表记录密态等值特性中列加密密钥相关信息,每条记录对应
一个列加密密钥。
名称
类型
描述
oid
oid
行标识符(隐含字段)。
column_key_name
name
列加密密钥(cek)名称。
column_key_distributed
_id
oid
根据加密密钥(cek)全称域名hash 值
得到的id。
global_key_id
oid
外键。客户端加密主密钥(cmk)的oi
d。

GBase 8c V5 开发者手册
南大通用数据技术股份有限公司
734
名称
类型
描述
key_namespace
oid
包含此列加密密钥(cek)的命名空间o
id。
key_owner
oid
列加密密钥(cek)的所有者。
create_date
timestamp
创建列加密密钥的时间。
key_acl
aclitem[]
创建该列加密密钥时所拥有的访问权
限。