在启动安装过程前,必须确保用户有足够的权限来执行安装。在如下的安装和准备过程中,需要将gbase用户加入至sudoer。
以下操作,如无特殊说明,在所有节点均需执行。
创建用户和配置sudoer
所有节点均创建gbase组和用户:
[root@localhost ~]# groupadd gbase
[root@localhost ~]# useradd -m -d /home/gbase gbase -g gbase
[root@localhost ~]# passwd gbase
返回并设置密码,请牢记密码。
添加gbase至sudoer:
[root@localhost ~]# visudo
在打开的文档中如下位置增加gbase用户及权限:
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
gbase ALL=(ALL) NOPASSWD:ALL
配置sudoer后,数据库安装配置操作无需root权限。
环境设置
防火墙关闭操作:需要将GBase 8c分布式数据库节点间访问端口打通才可以保证读写请求、数据等信息的正常传输。在普通业务场景中,数据库节点间及其与业务服务之间的网络通信都是在安全域内完成数据交互,如果没有特殊的安全要求,建议将节点的防火墙进行关闭操作。否则需要按照“集群规划”中的“端口号”信息配置防火墙白名单。
[gbase@localhost ~]$ sudo systemctl stop firewalld.service
禁止防火墙开机自启动:
[gbase@localhost ~]$ sudo systemctl disable firewalld.service
系统返回:
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
即为操作成功。
关闭selinux:
[gbase@localhost ~]$ sudo vim /etc/selinux/config
设置SELINUX=disabled,保存退出:
# 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.