【我和openGauss的故事】记录在openEuler-22.03中安装openGauss_5.0.0企业版(下篇)
创建用户和用户组
为了实现安装过程中安装帐户权限最小化,及安装后openGauss的系统运行安全性,安装脚本在安装过程中会自动按照用户指定内容创建安装用户,并将此用户作为后续运行和维护openGauss的管理员帐户。
- 用户组:dbgrp
- 用户:omm
创建目录
以root用户登录待安装openGauss的主机,并按规划创建存放安装包的目录。
不建议把安装包的存放目录规划到openGauss用户的根目录或其子目录下,可能导致权限问题。
openGauss用户须具有/opt/software/openGauss目录的读写权限。
上传安装包
将安装包openGauss-5.0.0-openEuler-64bit-all.tar.gz上传至所创建的/opt/software/openGauss目录中
解压安装包
创建xml文件
- 单节点配置文件
执行安装
采用交互模式执行预安装脚本
- 进入script目录
- 执行初始化安装
- 打印信息
警告信息处理
查看详情
A6警告信息
A6. [ System control parameters status ] : Warning
A7警告信息
A7. [ File system configuration status ] : Warning
重新打开一个会话窗口
A11警告信息
A11.[ Network card configuration status ] : Warning
在文末追加 MTU=“8192”,重启生效。
A12警告信息
A12.[ Time consistency status ] : Warning
- 查看ntp状态,发现ntp没有启动
- 启动ntp服务
- 查看ntp状态,如果发现ntp没有安装
○ 安装ntp服务
○ 启动ntp服务
重新执行初始化安装
- 进入script目录
- 执行初始化安装
- 打印信息
无警告信息
执行安装
安装验证
查看数据库启动状态
通过openGauss提供的gs_om工具可以完成数据库状态检查
以omm用户身份登录服务器
检查数据库状态是否正常
- 服务器IP地址:192.168.192.129
- 数据库的端口号:15400
- 数据库数据路径:/opt/huawei/install/data/dn
- P:安装时指定的角色为Primary
- Primary:实例为主实例
- Normal:openGauss可用
登录数据库
数据库安装完成后,默认生成名称为postgres的数据库。第一次连接数据库时可以连接到此数据库。
- postgres:openGauss安装完成后默认生成的数据库。初始可以连接到此数据库进行新数据库的创建。
- 15400:数据库主节点的端口号
文章转载自公众号:openGauss
作者你好:
学习安装过程中,“采用交互模式执行预安装脚本” 出现下面报错,能帮㤃分析一下问题在哪么?
[root@node0 script]# ./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.
Setting host ip env
Successfully set host ip env.
Are you sure you want to create the user[omm] (yes/no)? yes
Preparing SSH service.
Successfully prepared SSH service.
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 node0 --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.
[GAUSS-50219] : Failed to obtain declare -x HISTCONTROL=\"\"ignoredups\"\". There are illegal characters.