Yukon(禹贡)安装包安装教程 - 基于 openGauss 数据库和 CentOS 操作系统

本文详细介绍如何在CentOS 7.6环境下安装openGauss企业版2.1.0及Yukon GIS扩展,包括软件依赖环境配置、安装脚本执行步骤及创建数据库插件扩展等关键信息。

1. 背景介绍

  Yukon(禹贡),基于 openGauss 数据库扩展地理空间数据的存储和管理能力,提供专业的 GIS (Geographic Information System) 功能,赋能传统关系型数据库。Yukon 支持二三维一体化的空间数据存储能力,同时 Yukon 还支持与 PostgreSQL 的适配。

  本篇主要介绍 Yukon 安装包 基于 openGauss 数据库的 安装过程详解注意事项

2. 环境准备

软件 / 系统版本下载地址备注
CentOS7.6 及以上(7.xCentOS-7-x86_64-Everything-1810.iso推荐使用 CentOS 7.6 版本
openGauss企业版 2.1.0openGauss-2.1.0-CentOS-64bit-all.tar.gz仅支持 openGauss 企业版 2.1.0,暂不支持其他版本
Yukon1.0Yukon-1.0-openGauss2.1.0-CentOS_x64.tar.gzYukon 针对 openGauss 数据库分别提供了基于 CentOS 和 openeuler 操作系统的安装包

3. 安装过程

1) openGauss 企业版 2.1.0 安装

  • 下载 openGauss for CentOS 操作系统的安装包

    打开浏览器输入 https://opengauss.org/zh/download.html 进入 openGauss 数据库下载页面,选择 企业版 2.1.0 并下载对应操作系统的安装包
    openGauss企业版2.1.0下载页面.png

  • 在 CentOS 7.6 操作系统中解压 openGauss 企业版 2.1.0 安装包

    解压 openGauss-2.1.0-CentOS-64bit-all.tar.gz 安装包

    tar -zxvf openGauss-2.1.0-CentOS-64bit-all.tar.gz
    mkdir openGauss-2.1.0-CentOS-64bit-all
    tar -zxvf openGauss-2.1.0-CentOS-64bit-om.tar.gz -C ./openGauss-2.1.0-CentOS-64bit
    cd openGauss-2.1.0-CentOS-64bit
    ls
    

    openGauss企业版2.1.0安装包解压目录.png

  • 进入 simpleInstall 目录,执行 openGauss 企业版安装脚本

    • openGauss 企业版 2.1.0 安装脚本软件依赖情况:

      所需软件建议版本备注
      firewalld-关闭防火墙
      python3.x需 python 3.x 版本
      wget*openGauss 企业版快速安装脚本依赖
      curl*openGauss 企业版快速安装脚本依赖
      boost*该软件是为 Yukon 数据库中添加扩展模块使用,若缺少此依赖,则无法在 Yukon 数据库中添加扩展模块
    • openGauss 企业版 2.1.0 安装脚本清单:

      文件名称用途
      install.sh简化安装主程序
      common.sh公共命令
      README.md参考文档
      template.xmlxml模板
      finance.sql金融数据模型展示数据库
      school.sql学校数据模型展示数据库
  • 准备 openGauss 数据库安装的软件依赖环境

    • 关闭 CentOS 7.x 防火墙

      • 检查防火墙状态

        sudo systemctl status firewalld.service
        

        CentOS系统防火墙状态.png

      • 关闭防火墙

        sudo systemctl stop firewalld.service
        sudo systemctl status firewalld.service
        

        CentOS系统防火墙关闭状态.png

      • 禁用防火墙

        sudo systemctl disable firewalld.service
        

        禁用CentOS防火墙.png

    • 安装 python 3.x、wget、curl、boost 软件

      • 直接通过 yum 安装 python3

        sudo yum install python3 -y
        python3
        

        python3安装成功.png

      • 安装 wget、curl、boost

        sudo yum install wget curl boost -y
        
  • 使用 install.sh 脚本安装 openGauss 企业版 2.1.0

    • install.sh 命令参数详解

      • 命令模板

        sh install.sh -U user_name -G user_group -h host_ip -p port [-D install_path]
        
      • 参数说明

        • user_name:openGauss 数据库的安装用户。
        • user_group:openGauss 数据库安装用户所属用户组。
        • host_ip:主机在后端存储网络中的 IP 地址(内网 IP)。
        • host_port:数据库节点的基础端口号。
        • install_path:openGauss 数据库安装路径,该参数为可选参数。
      • 执行安装

        sudo sh install.sh -U omm -G omm -h 192.168.85.136 -p 5432
        

        openGauss企业版2.1.0安装成功.png

      • 导出 openGauss 企业版 2.1.0 环境变量

        cd /home/omm
        ls
        sudo cat env_single
        

        openGauss 企业版 2.1.0 数据库安装成功后,会在 /home/omm 目录下自动生成 env_single 文件,该文件记录了 openGauss 企业版数据库需要导出的环境变量
        openGauss企业版2.1.0环境变量文件.png
        openGauss企业版2.1.0需要导出的环境变量内容.png

2) Yukon 安装包 安装

  • 下载 Yukon for openGauss CentOS 的安装包

    打开浏览器输入 https://gitee.com/opengauss/yukon/releases/tag/v1.0 进入 Yukon 数据库下载页面,下载 Yukon-1.0-openGauss2.1.0-CentOS_x64.tar.gz 安装包
    Yukon for openGauss安装包下载页面.png

  • 切换当前用户为 omm,解压 Yukon-1.0-openGauss2.1.0-CentOS_x64.tar.gz 安装包

    su omm
    tar -zxvf Yukon-1.0-openGauss2.1.0-CentOS_x64.tar.gz
    cd Yukon-1.0-openGauss2.1.0-CentOS_x64-2022_06_24_12_28/
    ls
    

    Yukon安装包内容.png

  • 以 root 用户安装 Yukon 数据库

    su root
    sh install.sh -i
    

    Yukon数据库安装成功.png

  • 参考 Yukon 数据库入门教程 创建 Yukon 数据库插件扩展

    gsql -d postgres
    CREATE USER yukontest WITH SYSADMIN password "Bigdata@123";
    \q
    gsql -d postgres -U yukontest -W Bigdata@123
    CREATE TABLESPACE yukonspace LOCATION '/home/omm/data';
    CREATE DATABASE yukontutorial ENCODING='UTF8' TABLESPACE=yukonspace;
    \q
    gsql -d yukontutorial -U yukontest -W Bigdata@123
    CREATE EXTENSION postgis;
    CREATE EXTENSION postgis_raster;
    CREATE EXTENSION postgis_sfcgal;
    CREATE EXTENSION yukon_geomodel;
    CREATE EXTENSION yukon_geogridcoder;
    

    在Yukon数据库中添加Yukon提供的5大扩展模块.png

4. 注意事项

  • openGauss 企业版 2.1.0 安装异常 - 主机名异常

    • 异常现象
      openGauss企业版安装问题-CentOS操作系统主机名不正确.png

    • 解决方案

      修改 /etc/hostname 文件中记录的主机名,保存后并重启主机名服务

      sudo vim /etc/hostname
      sudo systemctl restart systemd-hostnamed
      
  • openGauss 企业版 2.1.0 安装异常 - 找不到 openGauss 企业版安装包

    • 异常现象
      openGauss企业版安装问题-openGauss安装包不正确.png

    • 解决方案

      删除 /etc/omm 目录下的 openGaussTar 目录后,重新执行安装命令即可

  • Yukon(禹贡)数据库安装成功后 ldconfig 输出 is not a symbolic link 信息

    • 这只是一个提示信息,说明只是有些文件命名不符合系统规定,并不影响功能正常使用
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值