GaussDB200单机实例安装使⽤教程【⼊门必看】
写在前⾯
GaussDB的产品,最初GaussDB的产品定义有三⼤产品线系列GaussDB 100、GaussDB 200、GaussDB300,简单介绍下:
1)GaussDB 100:主要以OLTP为主。⽬前该产品已经应⽤在招商银⾏。在 2020年6⽉,将会开源单机版本;
2)GaussDB 200:以OLAP为主,兼顾OLTP。该产品以 PostgreSQL 为出发点,⾯向 MPP 研发,⽬前已经在⼯商银⾏得到上线应⽤。
3)GaussDB 300:以 HTAP 为⽅向,是企业级分布式HTAP数据库(Hybrid Transaction and Analytical Process,混合事务和分析处理),民⽣银⾏尝试使⽤。
2019年10⽉左右,华为 GaussDB 的命名再次调整:
GaussDB 100 ,更名为 GaussDB T ,以 OLTP 和集为⽅向;
GaussDB 200 合并 300 的部分设计,更名为 GaussDB A,以分析型为主⽅向;
GaussDB 300,型号取消,涉及功能并⼊ 100 或 200 。
以下是官⽹下载地址:
01环境准备
说说我的环境:windows10开虚机,CentOS7.4(⽬前最⾼⽀持到此版本,请特别注意版本) ,⼤约10G内存 ,4 core
你要是是CentOS系统的话,可以使⽤命令:
[root@GaussDB200 ~]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[root@GaussDB200 ~]#
再次说明请特别注意版本,不然后⾯还是⽩搭
CentOS-7-x86_64-DVD-1708.iso (我是使⽤的这个 直接⾕歌就⽅便下载到)
[root@localhost ~]# free -h
total        used        free      shared  buff/cache  available
Mem:          9.4G        165M        9.1G        8.5M        136M        9.0G
Swap:          15G          0B        15G
[root@localhost ~]#
[root@localhost ~]#  cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
4  Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
[root@localhost ~]#
1.1 软件准备:
1.2 修改主机名:(修改后reboot⼀下)
1.3 修改hosts⽂件:
1.4 修改OS参数:
vim /f
vm.min_free_kbytes = (free -k|grep Mem|awk ‘{print $2}’)*5%
官⽅解释:强制Linux虚拟内存保留空闲空间的最⼩值,系统总内存的5%perl下载安装教程
1.5 安装依赖包:(防⽌缺包情况)
yum install -y OpenIPMI openldap \
openldap-clients openldap-servers perl-Perlilog procmail python-dateutil \
python-dmidecode python-gudev python-simplejson pytz \
sdparm
依赖包(补充)
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-a res.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_arch ipmitool.x86_64 iptables-services.x86_64 ipvsadm.x86_64 kernel-headers.x86_64 keyutils.x86_64 libasyncns.x8 6_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_idma p.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-modal ias.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_ arch 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_arc h pytalloc.x86_arch python-dmidecode.x86_64 python-ethtool.x86_arch arch quota.x86_arch redhat-lsb-core.x86_64 redhat-lsb-submod-security.x86_64 rng-tools.x86_64 rpcbind.x86_64 rsync.x 86_64 samba-client-libs.x86_arch samba-common-libs.x86_64 sdparm.x86_64 sendmail.x86_64 sg3_utils-libs.x86_64 smartmonto ols.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.x8 6_64
sssd-krb5-common.x86_64 sssd-ldap.x86_64 sssd-proxy.x86_arch sysstat.x86_arch 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_arch zip.x86_64 expect -y
提⽰:官⽅要求GaussDB200⾄少需要3个节点来安装,但此为测试练⼿使⽤,所以修改了参数⽂件的节点数,如需要部署多节点,配置⽂件请使⽤官⽅配置⽂件⽣成器进⾏⽣成
1.6 检查OS编码格式是否为en_US.UTF-8
否的话,需要修改vim /f
修改之后,reboot⼀下⽣效。
1.7 挂载操作系统镜像(补充):以root⽤户登录主机,执⾏命令:mount 虚拟光盘⽂件名 /media/ -o loop
如:sudo mount -t iso9660 -o loop /opt/softs/CentOS-7-x86_64-DVD-1708.iso /media/
注意:挂在使⽤的镜像必须与服务器系统同版本,如挂载提⽰readonly⽅式挂载,可在命令前加sudo 进⾏重试。根节点下media内有⽂件则证明挂载成功。
02安装GaussDB 200
2.1 解压/opt/softs ⽬录下准备的⼏个⽂件到/opt
[root@GaussDB200 softs]# tar -zxvf GaussDB_200_6.5.1_ -C ../
[root@GaussDB200 softs]# tar -zxvf FusionInsight_Manager_6.5.1_ -C ../
[root@GaussDB200 softs]# tar -zxvf FusionInsight_SetupTool_6.5. -C ../
查看解压结果
2.2 拷贝安装包
将除Manager外的其他部件包拷贝⾄/opt/FusionInsight_Manager/software/packs 路径下
使⽤
mkdir -p /opt/FusionInsight_Manager/software/packs 创建⽬录结果
[root@GaussDB200 opt]# cp FusionInsight_MPPDB_6.5.1_ /opt/FusionInsight_Manager/software/packs/
[root@GaussDB200 softs]# cp FusionInsight_BASE_6.5.1_ /opt/FusionInsight_Manager/software/packs/
得到如下结果:
2.3 进⾏预安装配置
将要安装GaussDB 200的节点上的“/opt/FusionInsight_SetupTool/preset”⽂件夹拷贝⾄节点的“/opt”⽬录下,此步骤为必须强制执⾏,并执⾏sh /opt/preset/preset.sh命令 如:
# cd /opt/
# ll
total 502672
drwxrwxr-x. 3 root  root        22 Aug  2  2019 FusionInsight_Manager
-rw-rw-r--. 1 20007 20007 514736059 Aug  1  2019 FusionInsight_MPPDB_6.5.1_
drwxr-xr-x. 7 root  root        146 Jul 10  2019 FusionInsight_SetupTool
drwxr-xr-x. 2 root  root        178 May 22 10:59 softs
# cp -r /opt/FusionInsight_SetupTool/preset/ /opt/
# ll
total 502672
drwxrwxr-x. 3 root  root        22 Aug  2  2019 FusionInsight_Manager
-rw-rw-r--. 1 20007 20007 514736059 Aug  1  2019 FusionInsight_MPPDB_6.5.1_
drwxr-xr-x. 7 root  root        146 Jul 10  2019 FusionInsight_SetupTool
drwxr-xr-x. 4 root  root        100 May 22 11:34 preset
drwxr-xr-x. 2 root  root        178 May 22 10:59 softs
# sh /opt/preset/preset.sh
start to preSet
success to preSet.
#
2.4 编辑FusionInsight_SetupTool相关配置⽂件
执⾏命令:vim /opt/FusionInsight_SetupTool/preinstall/preinstall.ini
## Description: FusionInsight Preinstall Configuration
## Type:        List
## Type:        List
## Default:    ""
#
# Description: A list of host names or IP addresses.
# Examples:
#  g_hosts="10.18.40.[1-5]"
#  g_hosts="10.18.[10-12].[1-200],192.188.45.[1-5,40],host[1-100]"
#
g_hosts="192.168.31.72"
## Type:        Integer
## Default:    0
#
#
# Description: Disk formatting options.
#              0 Don't Format
#              1 Format the disk (Don't force)
#              2 Force to format the disk
#              3 Don't Format, Just install diskmgt
#
g_parted=0
## Type:        List
## Default:    ""
#
# Description: Disk format configuration.
#              if g_parted is 1 or 2, g_parted_conf not null
# Examples:
#
#  g_parted_conf="
#  10.18.40.[1-3]:master.ini;
#  10.18.40.[4-10],host[1-100]:slave.ini;
#  host[101-200]:test.ini
#  "
#  g_parted_conf="10.18.40.[4-5]:master.ini;10.18.40.[6-7]:slave.ini;10.18.40.8:null.ini"
#
# Remarks: 1.Partition configuration file (master.ini, slave.ini, null.ini ..)
#            in partition/ini directory.
#
#          2.Partition configuration file support custom.
#
#          3.Nodes this don't need to format must be configured to null.ini.
g_parted_conf="192.168.31.72:null.ini"
## Type:        List
## Default:    ""
#
# Description: hostname configuration. g_hostname_conf not null
# Examples:
#
#  g_hostname_conf="
#  10.18.40.1:10.18.41.1:host1;
#  10.18.40.2:10.18.41.2:;
#  10.18.40.3:10.18.41.3:host3;
#  "
#  g_hostname_conf="10.18.40.1:10.18.41.1:host1;10.18.40.2:10.18.41.2:;10.18.40.3:10.18.41.3:host3;" #
# Remarks: 1. g_hostname_conf="OMIP:BusinessIP:HostName"
#
#          2. If you do not intend to configure the host name , then set the host name empty.
#            g_hostname_conf="OMIP:BusinessIP:"
#            g_hostname_conf=";10.18.40.2:10.18.41.2:"
#
g_hostname_conf="192.168.31.72:192.168.31.72:GaussDB200"
## Type:        Boolean

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。