【实验环境】
Vmware workstation 12
Centos-6.5
4c+16G
(自己配的高配台式电脑,没有条件的公有云ECS搭建好再导出导入吧,
考虑成本的话,华为云有Pass层服务可以直接买最近促销247/年,但是无法体会探索安装的快乐)
1*250G 存储
10.10.75.101
注意:由于官方强制要求至少需要3个节点来安装,
所以无法使用官方推荐的《GaussDB 200 6.5.1 配置规划工具》来安装,
该excel 文件中节点数量等部分单元格是只读的,强制修改还需要输入密码!
只能手动安装(参考《GaussDB 200 6.5.1 产品文档 3.8.3》)
部分步骤有省略(如检查OS编码格式等)
【步骤】
修改os参数
vi /etc/sysctl.conf
最后加上
vm.min_free_kbytes = (free -k|grep Mem|awk '{print $2}')*5%
创建目录并解压文件到指定目录
mkdir /GaussDB200
cd /GaussDB200
rz上传:
FusionInsight_Manager_6.5.1_RHEL.tar.gz
FusionInsight_BASE_6.5.1_RHEL.tar.gz
GaussDB_200_6.5.1_RHEL.tar.gz
FusionInsight_SetupTool_6.5.1.tar.gz
(可选)FusionInsight_MPPDBMonitor_6.5.1_RHEL.tar.gz
cd /GaussDB200
tar -zxvf FusionInsight_Manager_6.5.1_RHEL.tar.gz
tar -zxvf GaussDB_200_6.5.1_RHEL.tar.gz (→ FusionInsight_MPPDB_6.5.1_RHEL.tar.gz)
tar -zxvf FusionInsight_SetupTool_6.5.1.tar.gz
cd /GaussDB200
cp FusionInsight_BASE_6.5.1_RHEL.tar.gz FusionInsight_Manager/software/packs/
cp FusionInsight_MPPDB_6.5.1_RHEL.tar.gz FusionInsight_Manager/software/packs/
cp FusionInsight_MPPDBMonitor_6.5.1_RHEL.tar.gz FusionInsight_Manager/software/packs/
挂载操作系统镜像
注意:Centos的ISO镜像每个版本都有2个文件,都要下载下来
首选加在第2个iso文件,如果没有依赖包,再切换到第1个iso文件,
正常来说还是会缺包,需要通过yum安装
yum install -y OpenIPMI openldap openldap-clients openldap-servers perl-Perlilog procmail python-dateutil python-dmidecode python-gudev python-simplejson pytz sdparm
修改/etc/hosts
vi /etc/hosts
127.0.0.1 localhost --一定要有这一行,否则后面运行脚本时会报错
10.10.75.101 node1 --一个主机名只能对应一个IP,之前这台虚拟机上安装了RAC(7个IP需要注释6个)
注意:这里跳过sh /opt/preset/preset.sh创建omm用户+配置环境变量+修改属组,
因为这个步骤是安装Fusion_Insight时强制执行的,这里直接用root执行就好,
安装完Fusion_Insight就自动完成这些步骤!
编辑FusionInsight_SetupTool相关配置文件
vi /GaussDB200/FusionInsight_SetupTool/preinstall/preinstall.ini
这里只有一个节点所以只要编辑一个文件
vi /GaussDB200/FusionInsight_SetupTool/preinstall/partition/ini/host1.ini
g_hosts="10.10.75.101"
g_user_name="root"
g_port=22
g_parted=0
g_parted_conf="10.10.75.101:host1.ini;"
g_add_pkg=1
g_pkgs_dir="centos-6.5:/media/"
g_log_file="/tmp/fi-preinstall.log"
g_debug=0
g_hostname_conf="10.10.75.101:node1;"
g_swap_off=1
g_wce_conf=0
g_platform="x86_64"
g_core_dump=0
g_core_dump_dir="/var/log/core"
注意:这里不另外加磁盘,也格式化分区,
后面直接把所有文件装在指定目录中!
dbdata_om.conf y y n
mppdb1.conf y y n
注意:这里不配置backup_om.conf
配置并检查安装环境
cd /GaussDB200/FusionInsight_SetupTool
./setuptool.sh preinstall -n
注意:一定要加-n参数,setuptool.sh脚本中有解释该选项作用when the -n parameter is used, the precheck.sh script will not be executed after the preinstall.sh script is executed.
不加-n会自动调用precheck.sh,因为只有一台机器,不满足官方推荐的3个节点,
肯定是无法通过的,所以直接跳过!
编辑FusionInsight_Manager相关配置文件
vi /GaussDB200/FusionInsight_Manager/software/install.ini
ha_mode=single
local_ip1=10.10.75.101
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=/GaussDB200/app
bigdata_data_home=/GaussDB200/data
cluster_nodes_scale=
tls_protocol_min=
realm_parse_ip=
kerberos_realm=
[/HA]
安装FusionInsight_Manager
./install.sh -f /GaussDB200/FusionInsight_Manager/software/install.ini
=================================== Welcome ===================================
=== STEP 1 Checking the parameters.
=== STEP 2 Preparing for installation components. [done]
=== STEP 3 Installing the manager. [done]
=== STEP 4 Installing the packs. [done]
=== STEP 5 Starting the OMS. [done]
=== STEP 6 Waiting for ntp to startup. [done]
=== STEP 7 Configuring and starting agent. [fail]
ERROR:Failed to config and start nodeagent.
ERROR:Installation failed. For details about the error, see the log file /var/log/Bigdata/controller/scriptlog/install.log.
Please run the following script to delete useless files:
/GaussDB200/app/om-server/om/inst/uninstall.sh
[2020-03-15 09:48:36] ERROR File /GaussDB200/app/om-server_6.5.1/om/etc/om/omm.keytab not created in 120s. [install.sh(waitForKeytab):1817](9266)
[2020-03-15 09:48:37] ERROR Waiting for controller to generate keytab failed. [install.sh(configAndStartAgent):1742](9266)
ERROR:Waiting for controller to generate keytab failed.
[2020-03-15 09:48:37] ERROR Failed to config and start nodeagent. [install.sh(main):2315](9266)
[2020-03-15 09:48:37] ERROR Installation failed. For details about the error, see the log file /var/log/Bigdata/controller/scriptlog/install.log. [install.sh(post_install):545](9266)
注意:虚拟机太卡导致等待超时,先卸载失败的步骤,
修改install.sh的max_time最大时间为120秒,重新运行后成功
=================================== Welcome ===================================
=== STEP 1 Checking the parameters.
=== STEP 2 Preparing for installation components. [done]
=== STEP 3 Installing the manager. [done]
=== STEP 4 Installing the packs. [done]
=== STEP 5 Starting the OMS. [done]
=== STEP 6 Waiting for ntp to startup. [done]
=== STEP 7 Configuring and starting agent. [done]
============================= Install Successfully ============================
Please visit http://10.10.75.101:8080/web/ to continue cluster installation.
Installation is successful.
[root@node1 software]# netstat -nultp|grep 8080
tcp 0 0 ::ffff:10.10.75.101:8080 :::* LISTEN 29011/java
执行单机版配置脚本(一定要用omm用户来运行!)
GaussDB 200默认部署方案至少需要3个节点,如需部署单机版需要在安装集群前,运行单机版配置脚本,将各服务实例的最小配置实例数改为1。执行单机版配置脚本后,需要重启controller生效
sh /GaussDB200/app/om-server_6.5.1/om/sbin/enable_single_host_cluster.sh
sh /GaussDB200/app/om-server_6.5.1/om/sbin/restart-controller.sh
注意:这里刚开始用root运行时直接报错,但是没有显示出原因,可以用sh -x来运行脚本看到具体失败原因!
修改浏览器配置
[Internet选项] → [高级] → [设置] → 取消勾选“使用 SSL 2.0”和“使用 SSL 3.0”和“使用TLS 1.1”和“使用 TLS 1.2” → 一定要勾选“使用TLS 1.0”,否则无法打开登录页面
登录FusionInsight_Manager的web界面配置集群
http://10.10.75.101:8080/web
默认账号密码admin/Admin@123
修改后:admin/Huww-200
注意:这里必须选择MPPDB下拉框后再配置!
注意:这里的配置是/GaussDB200/FusionInsight_SetupTool/preinstall/partition/ini-plugin/conf/mppdb1.conf中dir的值/GaussDB200/data/mppdb/data1
【参考】
https://blog.51cto.com/candon123/2444826?source=dra
https://blog.csdn.net/lskbk/article/details/102706089
√ ×▲▼●◆■★
↖ ↑ ↗ → ↘ ↓ ↙ ← →