环境信息
操作系统: centos7.6
数据库版本:openGauss-Server-7.0.0-RC1
数据库架构:1主1备
安装工具:openGauss-OM
python3 环境准备
安装脚本里需要python3 的环境,需要启用python的 --enable-shared 功能
-
安装操作系统依赖包 install -y openssl-devel libffi-devel python3-devel
-
编译python
./configure --enable-shared make make install
初始化安装环境 ./gs_preinstall -U omm -G dbgrp -X
错误一:[GAUSS-51405] : You need to install software:expect
分析原因是配置互信时需要expect 包
[root@main script]# ./gs_preinstall -U omm -G dbgrp -X /root/soft/install.xml
[GAUSS-51405] : You need to install software:expect
yum install expect
错误二:ImportError: this module was compiled for Python 3.6
[root@main script]# ./gs_preinstall -U omm -G dbgrp -X /root/soft/install.xml
Traceback (most recent call last):
File "/root/soft/script/gspylib/threads/SshTool.py", line 46, in <module>
import paramiko
File "/root/soft/script/domain_utils/sql_handler/../../../lib/paramiko/__init__.py", line 22, in <module>
from paramiko.transport import SecurityOptions, Transport
File "/root/soft/script/domain_utils/sql_handler/../../../lib/paramiko/transport.py", line 89, in <module>
from paramiko.dsskey import DSSKey
File "/root/soft/script/domain_utils/sql_handler/../../../lib/paramiko/dsskey.py", line 37, in <module>
from paramiko.pkey import PKey
File "/root/soft/script/domain_utils/sql_handler/../../../lib/paramiko/pkey.py", line 31, in <module>
import bcrypt
File "/root/soft/script/domain_utils/sql_handler/../../../lib/bcrypt/__init__.py", line 25, in <module>
from . import _bcrypt # type: ignore
ImportError: this module was compiled for Python 3.6
看来python只能用3.6 . 只能重新编译python 3.6
错误三:python版本冲突
[GAUSS-51400] : Failed to execute the command: python3 '/root/soft/script/local/PreInstallUtility.py' -t create_os_user -u omm -g dbgrp -l /var/log/omm/omm/om/gs_local.log. Result:{'192.168.149.100': 'Failure', '192.168.149.131': 'Success'}.
Error:
[FAILURE] 192.168.149.100:
Traceback (most recent call last):
File "/root/soft/script/local/PreInstallUtility.py", line 39, in <module>
from gspylib.common.ParameterParsecheck import Parameter
File "/root/soft/script/local/../gspylib/common/ParameterParsecheck.py", line 27, in <module>
from gspylib.common.Common import DefaultValue
File "/root/soft/script/local/../gspylib/common/Common.py", line 20, in <module>
import ctypes
File "/usr/local/python3/lib/python3.9/ctypes/__init__.py", line 8, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
[SUCCESS] 192.168.149.131:
安装最后报错,又用到了系统里的别的路径下的python3.9,出现了不兼容问题。看来环境里的别的版本的python需要清理干净
小结
其实只要提前把准备工作做好,OpenGaussDB的安装部署脚本用起来还是挺顺手的。这个脚本考虑到了很多安装过程中的细节,开发团队在背后做了不少扎实的工作。比如说,他们提前优化了系统底层的内核参数,还预先设置好了数据库的各种初始参数,甚至连操作系统里专门用于运行数据库的“omm”用户的环境变量都配置好了。
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




