目录
安装前准备
安装依赖
修改/etc/hosts
上传解压介质
预安装
拷贝安装包
预安装配置
编辑preinstall.ini配置文件
编辑host0配置文件
执行预安装命令
安装FusionInsight_Manager
修改install安装配置文件
执行安装命令
web操作安装数据库
GaussDB200测试
配置远程访问
配置DBeaver数据库客户端访问GaussDB200
yum install dos2unix net-tools 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
vi /etc/hosts
192.168.11.193 gaussdb200-651-193 gaussdb200-651-193.
mkdir -p /opt/gaussdb-install
ll /opt/gaussdb-install/
total 1703396
-rw-r--r--. 1 root root 41199496 May 6 15:48 FusionInsight_BASE_6.5.1_RHEL.tar.gz
-rw-r--r--. 1 root root 671770481 May 6 15:55 FusionInsight_Manager_6.5.1_RHEL.tar.gz
-rw-r--r--. 1 root root 514736059 May 6 15:52 FusionInsight_MPPDB_6.5.1_RHEL.tar.gz
-rw-r--r--. 1 root root 1744071 May 6 15:50 FusionInsight_SetupTool_6.5.1.tar.gz
-rw-r--r--. 1 root root 514818992 May 6 16:00 GaussDB_200_6.5.1_RHEL.tar.gztar -zxvf GaussDB_200_6.5.1_RHEL.tar.gz
FusionInsight_MPPDB_6.5.1_RHEL.tar.gz
cd /opt/gaussdb-install/
tar -zxvf FusionInsight_Manager_6.5.1_RHEL.tar.gz
tar -zxvf FusionInsight_SetupTool_6.5.1.tar.gz
cp FusionInsight_MPPDB_6.5.1_RHEL.tar.gz FusionInsight_Manager/software/packs/
cp FusionInsight_BASE_6.5.1_RHEL.tar.gz FusionInsight_Manager/software/packs/
bash FusionInsight_SetupTool/preset/preset.sh
cp -p FusionInsight_SetupTool/preinstall/preinstall.ini{,_bak}
diff preinstall.ini preinstall.ini_bak
11c11
< g_hosts="192.168.11.193"
---
> g_hosts=""
45c45
< g_parted_conf="192.168.11.193:host0.ini;"
---
> g_parted_conf=""
76c76
< g_add_pkg=0
---
> g_add_pkg=1
173c173
< g_platform="x86_64"
---
> g_platform=""
215c215
< g_core_dump_dir="/var/log/core"
---
> g_core_dump_dir="/var/log/core"
vi 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
./FusionInsight_SetupTool/setuptool.sh preinstall -n
Please enter cluster SSH password for root:
**FusionInsight PreInstall is starting...
***** Schedule:0%
……
***** Schedule:100%
You can get more information about the preinstall from /tmp/fi-preinstall.log and /tmp/diskmgt/autopart.log
vi FusionInsight_Manager/software/install.ini
[HA]
ha_mode=single
local_ip1=192.168.11.193
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=
realm_parse_ip=
kerberos_realm=
[/HA]
mkdir -p /srv/BigData
FusionInsight_Manager/software/install.sh -f /opt/gaussdb-install/FusionInsight_Manager/software/install.ini
安装完后会自动创建omm用户:
id omm
uid=2000(omm) gid=10(wheel) groups=10(wheel),9998(ficommon)
su - omm
sh ${BIGDATA_HOME}/om-server/om/sbin/enable_single_host_cluster.sh
sh ${BIGDATA_HOME}/om-server/om/sbin/restart-controller.shhttp://192.168.11.193:8080/web/index.html
默认用户名与密码:admin/Admin@123web操作创建集群,具体操作参考:https://www.jianshu.com/p/ffb47ab1d0f6
## omm用户执行,查看数据库版本
$ gsql -V
gsql GaussDBV100R003C10SPC117 (2017-11-21 14:46:48)
## omm用户执行,加载环境变量(此时再次查看数据库版本就不同了,是kernel version)
$ source ${BIGDATA_HOME}/mppdb/.mppdbgs_profile
$ gsql -V
gsql (GaussDB Kernel V300R002C00 build 8a9c1eb6) compiled at 2019-08-01 18:47:38 commit 6093 last mr 10175
## 查询集群示例状况
$ gs_om -t status --detail## 确认Postgresql端口
$ cat /srv/BigData/mppdb/data1/coordinator/postgresql.conf | grep '\bport\b'
port = 25308 # (change requires restart)## 连接gaussdb(如果不加载${BIGDATA_HOME}/mppdb/.mppdbgs_profile ,执行就会报下面的错误)
gsql -d postgres -p 25308
gsql: connect to server failed: No such file or directory. Please check socket file in the directory GUC option "unix_socket_directory" indicated exists or not.# 创建用户和数据库,用户密码必须包含三种字符,否则会报错;
$ gsql -d postgres -p 25308
gsql ((GaussDB Kernel V300R002C00 build 8a9c1eb6) compiled at 2019-08-01 18:47:38 commit 6093 last mr 10175 )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.postgres=# create user your_name with password "yourpwd";
CREATE ROLE
postgres=# create database db_yourdb;
CREATE DATABASE
gs_guc reload -Z coordinator -N all -I all -h "host all all 192.168.10.0/23 sha256"
# 最后重启数据库
gs_om -t stop && gs_om -t start
数据库-驱动器管理-新建
驱动器名称:gauss200
类名:com.huawei.gauss200.jdbc.Driver
URL模板:jdbc:gaussdb://{host}[:{port}]/[{database}]
默认端口:25308
默认用户:omm
默认数据库:postgres
库:添加“D:\00-myWorkstation\jar\jdbc\gsjdbc200.jar”