Centos 7 部署 openGauss 3.1.0 级联备库集群及集群缩容删除节点-运维指南 ...

锦通  金牌会员 | 2022-11-18 18:31:29 | 显示全部楼层 | 阅读模式
打印 上一主题 下一主题

主题 554|帖子 554|积分 1662

一、安装环境设置

1.1 硬件环境

名称最低配置建议配置测试配置服务器数量3略略硬盘* 至少1GB用于安装openGauss的应用程序。
* 每个主机需大约300MB用于元数据存储。
* 预留70%以上的磁盘剩余空间用于数据存储。略略内存>=2G略略CPU功能调试最小1×8核,2.0GHz略略网络300兆以上以太网,生产建议采用bond略略1.2 软件环境

软件类型信息描述操作系统Centos 7.6Linux文件系统剩余inode个数 > 15亿(推荐)工具bzip2Python*  oepnEuler:支持Python 3.7.x
*  Centos 7.6: 支持Python 3.6.x数据库版本opengauss 3.1.0 企业版数据库软件包名称openGauss-3.1.0-CentOS-64bit-all.tar.gz1.2.1 安装python
  1. -- root用户【所有节点】
  2. # 本次选择安装python 3.6.5版本
  3. mkdir /usr/local/python3
  4. cd /usr/local/python3
  5. wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
  6. tar -zxf Python-3.6.5.tgz
  7. cd /usr/local/python3/Python-3.6.5
  8. ./configure --prefix=/usr/local/python3 --enable-shared CFLAGS=-fPIC  
  9. make && make install
  10. ln -s /usr/local/python3/bin/python3 /usr/bin/python3
  11. ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
  12. -- 设置环境变量
  13. cat >>/etc/profile<<EOF
  14. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/python3/bin
  15. EOF
  16. source /etc/profile
  17. echo "/usr/local/python3/lib/" >> /etc/ld.so.conf
  18. ldconfig
  19. -- 如遇如下报错
  20. python3: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
  21. 可执行 cp /usr/local/python3/Python-3.6.5/libpython3.6m.so.1.0 /usr/lib64/
复制代码
1.2.2 安装软件依赖包

1.2.2.1 软件依赖要求

所需软件建议版本libaio-devel建议版本:0.3.109-13flex要求版本:2.5.31 以上bison建议版本:2.7-4ncurses-devel建议版本:5.9-13.20130511glibc-devel建议版本:2.17-111patch建议版本:2.7.1-10redhat-lsb-core建议版本:4.1readline-devel建议版本 :7.0-13libnsl(openeuler+x86环境中)建议版本 :2.28-361.2.2.2 安装软件依赖包
  1. -- root用户 【所有节点】
  2. -- 安装依赖包
  3. yum install -y libaio-devel flex bison ncurses-devel glibc-devel patch redhat-lsb-core readline-devel zlib readline gcc perl-ExtUtils-Embed readline-devel zlib-devel expect
  4. -- 检查是否已安装
  5. rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep -E "libaio-devel|flex|bison|ncurses-devel|glibc-devel|patch|redhat-lsb-core|readline-devel|zlib|readline|gcc|python|python-devel|perl-ExtUtils-Embed|readline-devel|zlib-devel|expect"
复制代码
1.2.3 操作系统配置

1.2.3.1 修改操作系统参数
  1. -- root用户 【所有节点】
  2. -- 添加如下参数:
  3. cat>>/etc/sysctl.conf <<EOF
  4. net.ipv4.tcp_fin_timeout=60
  5. net.ipv4.tcp_retries1=5
  6. net.ipv4.tcp_syn_retries=5
  7. net.sctp.path_max_retrans=10
  8. net.sctp.max_init_retransmits=10
  9. EOF
  10. -- 生效参数
  11. sysctl -p
  12. ## 执行sysctl -p 时有如下报错,此处选择忽略
  13. sysctl: cannot stat /proc/sys/net/sctp/path_max_retrans: No such file or directory
  14. sysctl: cannot stat /proc/sys/net/sctp/max_init_retransmits: No such file or directory
  15. # 预安装过程根据系统参数配置会有相应提示,请按照提示对应系统参数
复制代码
1.2.3.3 关闭透明大页
  1. -- root用户 【所有节点】
  2. echo "* soft stack 3072" >> /etc/security/limits.conf
  3. echo "* hard stack 3072" >> /etc/security/limits.conf
  4. echo "* soft nofile 1000000" >> /etc/security/limits.conf
  5. echo "* hard nofile 1000000" >> /etc/security/limits.conf
  6. echo "* soft nproc unlimited" >> /etc/security/limits.d/90-nproc.conf
  7. tail -n 4 /etc/security/limits.conf
  8. tail -n 1 /etc/security/limits.d/90-nproc.conf
复制代码
1.2.3.4 关闭防火墙
  1. -- root用户 【所有节点】
  2. -- openGauss默认关闭使用transparent_hugepage服务,并将关闭命令写入操作系统启动文件
  3. cat >> /etc/rc.d/rc.local<<EOF
  4. if test -f /sys/kernel/mm/transparent_hugepage/enabled;
  5.         then
  6.                 echo never > /sys/kernel/mm/transparent_hugepage/enabled
  7. fi
  8. if test -f /sys/kernel/mm/transparent_hugepage/defrag;
  9.         then
  10.                 echo never > /sys/kernel/mm/transparent_hugepage/defrag
  11. fi
  12. EOF
  13. -- 查看是否关闭:
  14. cat /sys/kernel/mm/transparent_hugepage/enabled
  15. cat /sys/kernel/mm/transparent_hugepage/defrag
复制代码
1.2.3.5 关闭selinux
  1. -- root用户 【所有节点】
  2. systemctl disable firewalld.service
  3. systemctl stop firewalld.service
复制代码
1.2.3.6 修改字符集
  1. -- root用户 【所有节点】
  2. sed -i  "s/SELINUX=enforcing/SELINUX=disabled/"  /etc/selinux/config
  3. -- 检查
  4. cat /etc/selinux/config | grep disabled
复制代码
1.2.3.12 修改DNS配置

[code]-- root用户 【所有节点】-- 节点一cat >>/etc/resolv.conf/etc/resolv.conf/etc/resolv.conf/etc/resolv.conf /etc/hosts
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

锦通

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表