GaussDB200 部署

文章 犀牛 ⋅ 于 2021-06-09 22:35:18 ⋅ 495 阅读

前言

GaussDB安装需要使用fi manager,目前支持的centos最高版本为7.4,不能选择高于该版本。推荐配置内存16G,cpu核心数8C,硬盘300G。

软件准备

解压gaussdb.tar包,并解压至/opt目录下

上传操作系统镜像CentOS-7-x86_64-DVD-1810.iso

file

前置动作

#修改主机名
hostnamectl set-hostname yourhostname
#修改hosts文件,增加yourip yourhostname
yourip yourhostname
#安装依赖包
yum install acpid.x86_64 at.x86_64 attr.x86_64 autogen-libopts.x86_64 bc.x86_64 bind-libs.x86_64 bind-utils.x86_64 bridge-utils.x86_64 bzip2.x86_64 c-ares.x86_64 checkpolicy.x86_64 cifs-utils.x86_64 crash.x86_64 cryptsetup.x86_64 cups-client.x86_64 cvs.x86_64 cyrus-sasl.x86_64 cyrus-sasl-gssapi.x86_64 cyrus-sasl-plain.x86_64 ed.x86_64 gamin.x86_64 gdbm-devel.x86_64 glibc-devel.x86_64 glibc-headers.x86_64 gnutls.x86_64 hdparm.x86_64 hesiod.x86_64 http-parser.x86_64 iotop.noarch ipmitool.x86_64 iptables-services.x86_64 ipvsadm.x86_64 kernel-headers.x86_64 keyutils.x86_64 libasyncns.x86_64 libbasicobjects.x86_64 libcgroup.x86_64 libcollection.x86_64 libdb-devel.x86_64 libdhash.x86_64 libevent.x86_64 libgudev1.x86_64 libini_config.x86_64 libipa_hbac.x86_64 libitm.x86_64 libldb.x86_64 libmodman.x86_64 libnfsidmap.x86_64 libnl.x86_64 libpath_utils.x86_64 libpcap.x86_64 libproxy.x86_64 libref_array.x86_64 libreport-filesystem.x86_64 libsmbclient.x86_64 libsss_autofs.x86_64 libsss_certmap.x86_64 libsss_idmap.x86_64 libsss_nss_idmap.x86_64 libsss_sudo.x86_64 libtalloc.x86_64 libtar.x86_64 libtdb.x86_64 libtevent.x86_64 libtirpc.x86_64 libtool-ltdl.x86_64 libusb.x86_64 libusbx.x86_64 libwbclient.x86_64 libxml2-python.x86_64 lm_sensors-libs.x86_64 lsof.x86_64 m2crypto.x86_64 m4.x86_64 mailx.x86_64 mdadm.x86_64 mlocate.x86_64 net-snmp.x86_64 net-snmp-agent-libs.x86_64 net-snmp-libs.x86_64 net-snmp-utils.x86_64 nettle.x86_64 nscd.x86_64 nss_compat_ossl.x86_64 ntp.x86_64 ntpdate.x86_64 numactl.x86_64 numad.x86_64 oddjob.x86_64 oddjob-mkhomedir.x86_64 OpenIPMI.x86_64 OpenIPMI-libs.x86_64 OpenIPMI-modalias.x86_64 openldap-clients.x86_64 openldap-servers.x86_64 pam_krb5.x86_64 patch.x86_64 pax.x86_64 pciutils.x86_64 perl-Compress-Raw-Bzip2.x86_64 perl-Compress-Raw-Zlib.x86_64 perl-Data-Dumper.x86_64 perl-DBI.x86_64 perl-devel.x86_64 perl-ExtUtils-Install.noarch perl-ExtUtils-MakeMaker.noarch perl-ExtUtils-Manifest.noarch perl-ExtUtils-ParseXS.noarch perl-IO-Compress.noarch perl-Net-Daemon.noarch perl-PlRPC.noarch perl-Test-Harness.noarch perl-version.x86_64 pm-utils.x86_64 portreserve.x86_64 procmail.x86_64 psmisc.x86_64 pygobject2.x86_64 pyOpenSSL.x86_64 pyparsing.noarch pytalloc.x86_64 python-chardet.noarch python-dateutil.noarch python-dmidecode.x86_64 python-ethtool.x86_64 python-kitchen.noarch python-sssdconfig.noarch pytz.noarch quota.x86_64 quota-nls.noarch redhat-lsb-core.x86_64 redhat-lsb-submod-security.x86_64 rng-tools.x86_64 rpcbind.x86_64 rsync.x86_64 samba-client-libs.x86_64 samba-common.noarch samba-common-libs.x86_64 sdparm.x86_64 sendmail.x86_64 sg3_utils-libs.x86_64 smartmontools.x86_64 spax.x86_64 sssd.x86_64 sssd-ad.x86_64 sssd-client.x86_64 sssd-common.x86_64 sssd-common-pac.x86_64 sssd-ipa.x86_64 sssd-krb5.x86_64 sssd-krb5-common.x86_64 sssd-ldap.x86_64 sssd-proxy.x86_64 stix-fonts.noarch sysstat.x86_64 system-config-firewall-base.noarch systemtap-sdt-devel.x86_64 tcp_wrappers.x86_64 time.x86_64 traceroute.x86_64 trousers.x86_64 unixODBC.x86_64 unzip.x86_64 usermode.x86_64 yum-utils.noarch zip.x86_64 expect -y
#检查操作系统字符集,如果不为zh_CN.UTF-8,则修改为zh_CN.UTF-8
cat /etc/locale.conf
#挂载操作系统镜像
mount /opt/CentOS-7-x86_64-DVD-1708.iso /media/ -o loop

安装GaussDB 200

  • 解压安装包
tar -zxvf GaussDB_200_6.5.1_RHEL.tar.gz -C ../
tar -zxvf FusionInsight_Manager_6.5.1_RHEL.tar.gz -C ../
tar -zxvf FusionInsight_SetupTool_6.5.1.tar.gz -C ../

file

  • 拷贝安装包
cp FusionInsight_MPPDB_6.5.1_RHEL.tar.gz /opt/FusionInsight_Manager/software/packs/
cp FusionInsight_BASE_6.5.1_RHEL.tar.gz /opt/FusionInsight_Manager/software/packs/

file

  • 预安装配置
cd /opt
cp -r /opt/FusionInsight_SetupTool/preset/ /opt/
sh /opt/preset/preset.sh
  • 编辑preinstall配置文件
vim /opt/FusionInsight_SetupTool/preinstall/preinstall.ini

写入如下内容:

g_hosts="你的机器IP" 
g_parted=0 
g_parted_conf="你的机器IP:host0.ini;" 
g_hostname_conf="你的机器IP:你的机器IP:你的机器hostname;" 
g_add_pkg=1 
g_pkgs_dir="centos-7.6:/media/" 
g_swap_off=1 
g_user_name="root" 
g_port=22 
g_log_file="/tmp/fi-preinstall.log" 
g_check=1 
g_debug=0 
g_wce_conf=0 
g_platform="x86_64" 
g_optimize="default" 
g_kms_conf=0 
g_core_dump=0 
g_core_dump_dir="/var/log/core"
  • 编辑host0配置文件
vim /opt/FusionInsight_SetupTool/preinstall/partition/ini/host0.ini

写入如下内容:

#mount               required    care    condition
dbdata_om.conf       y           y       n
backup_om.conf       y           y       n
mppdb1.conf          y           y       n
  • 执行预安装命令
cd /opt/FusionInsight_SetupTool && ./setuptool.sh preinstall -n
  • 修改install安装配置文件
vim /opt/FusionInsight_Manager/software/install.ini

写入如下内容:

[HA]
    ha_mode=single
    local_ip1=你的机器IP
    local_ip2=
    local_ip3=
    local_ip4=
    peer_ip1=
    peer_ip2=
    peer_ip3=
    peer_ip4=
    ws_float_ip=
    ws_float_ip_interface=
    ws_float_ip_netmask=
    ws_gateway=
    om_float_ip=
    om_float_ip_interface=
    om_float_ip_netmask=
    om_gateway=
    ntp_server_ip=
    om_mediator_ip=
    sso_ip=
    sso_port=
    bigdata_home=/opt/huawei/Bigdata
    bigdata_data_home=/srv/BigData
    cluster_nodes_scale=
    tls_protocol_min=
[/HA]
  • 执行安装命令
mkdir -p /srv/BigData
cd /opt/FusionInsight_Manager/software && ./install.sh -f /opt/FusionInsight_Manager/software/install.ini

file

  • web操作
su - omm
sh ${BIGDATA_HOME}/om-server/om/sbin/enable_single_host_cluster.sh
sh ${BIGDATA_HOME}/om-server/om/sbin/restart-controller.sh

http://xxx.xxx.xxx.xxx:8080/web/

用户名与密码:admin/Admin@123

file

  • 创建集群

file

file

file

file

file

file

file

file

GaussDB200测试

#gaussdb使用
#omm用户执行
source ${BIGDATA_HOME}/mppdb/.mppdbgs_profile 
#查询集群示例状况
gs_om -t status --detail
#确认postgresql端口
cat /srv/BigData/mppdb/data1/coordinator/postgresql.conf | grep port
#连接gaussdb
gsql -d postgres -p 25308
#创建用户
create user xiniu with password "yourpassword"
#创建库
create database db_xiniu;
#退出数据库
\q
#使用新用户登录
gsql -d db_xiniu -p 25308 -U xiniu -W "yourpassword"
版权声明:原创作品,允许转载,转载时务必以超链接的形式表明出处和作者信息。否则将追究法律责任。来自海牛部落-犀牛,http://hainiubl.com/topics/75660
本帖已被设为精华帖!
本帖由 青牛 于 3月前 加精
回复数量: 0
    暂无评论~~
    • 请注意单词拼写,以及中英文排版,参考此页
    • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`, 更多语法请见这里 Markdown 语法
    • 支持表情,可用Emoji的自动补全, 在输入的时候只需要 ":" 就可以自动提示了 :metal: :point_right: 表情列表 :star: :sparkles:
    • 上传图片, 支持拖拽和剪切板黏贴上传, 格式限制 - jpg, png, gif,教程
    • 发布框支持本地存储功能,会在内容变更时保存,「提交」按钮点击时清空
    Ctrl+Enter