HomeMogDBMogDB StackUqbar
v3.0

Documentation:v3.0

Supported Versions:

Other Versions:

gs_install_plugin_local

Background

MogDB provides gs_install_plugin_local for installing plugins. Currently, the supported plugins include pg_repack, pg_trgm, dblink, wal2json, orafce, pg_bulkload, and pg_prewarm. This tool is suitable for MogDB single node deployment.

 

Prerequisites

The deployment of MogDB single node has been completed.

Syntax

gs_install_plugin_local [-h] [-X XML] [--all] [--dblink] [--pg_trgm] [--wal2json] [--pg_repack] [--orafce] [--pg_bulkload] [--pg_prewarm] [--plugins PLUGINS [PLUGINS ...]]

 

Parameter Description

  • -h

    show help message and exit

  • -X

    Add the location of the MogDB clusterconfig.xml file.

  • --all

    Install all plugins.

  • --plugins

    Multiple parameters can be accepted, for example: --plugins dblink pg_repack wal2json

  • --dblink

    Install dblink plugin.

  • --pg_trgm

    Install pg_trgm plugin.

  • --wal2json

    Install wal2json plugin.

  • --pg_repack

    Install pg_repack plugin.

  • --orafce

    Install orafce plugin.

  • --pg_bulkload

    Install pg_bulkload plugin.

 

Example

  1. Go to the script folder of the database installation directory.

    cd /opt/software/mogdb/script/
  2. Create the static folder.

    mkdir -p static

    Note: Please do not change the folder name.

  3. Visit MogDB official website download page, download the corresponding version of the plugin according to your operating system and CPU architecture, and put the plugin in the static folder.

  4. Set permissions.

    chmod -R 755 /opt/software/mogdb/script
    chown -R omm:dbgrp /opt/software/mogdb/script
  5. Configure XML File. The XML file configuration uses single node configuration file as an example. backIp1s is the IP address of a node, and dataNode1 is the data directory. The data directory obtained by this program by default is the data directory of the first node.

    <?xml version="1.0" encoding="UTF-8"?>
    <ROOT>
        <!-- Overall information about MogDB -->
        <CLUSTER>
            <PARAM name="clusterName" value="dbCluster" />
            <PARAM name="nodeNames" value="node1" />
            <PARAM name="backIp1s" value="192.168.0.11"/>
            <PARAM name="gaussdbAppPath" value="/opt/mogdb/app" />
            <PARAM name="gaussdbLogPath" value="/var/log/mogdb" />
            <PARAM name="gaussdbToolPath" value="/opt/mogdb/tools" />
            <PARAM name="corePath" value="/opt/mogdb/corefile"/>
            <PARAM name="clusterType" value="single-inst"/>
        </CLUSTER>
    
        <!-- Information about node deployment on each server  -->
        <DEVICELIST>
            <!-- Information about the node deployment on node1  -->
            <DEVICE sn="1000001">
                <PARAM name="name" value="node1"/>
                <PARAM name="azName" value="AZ1"/>
                <PARAM name="azPriority" value="1"/>
                <!-- If only one NIC is available for the server, set backIP1 and sshIP1 to the same IP address. -->
                <PARAM name="backIp1" value="192.168.0.11"/>
                <PARAM name="sshIp1" value="192.168.0.11"/>
    
                <!--dbnode-->
                <PARAM name="dataNum" value="1"/>
                <PARAM name="dataPortBase" value="26000"/>
                <PARAM name="dataNode1" value="/mogdb/data/db1"/>
            </DEVICE>
        </DEVICELIST>
    </ROOT>
  6. Switch to omm user.

    su - omm
  7. Install all plugins.

    /opt/software/mogdb/script/gs_install_plugin_local -X /opt/software/mogdb/clusterconfig.xml --all
    
    # When the installation is successful, the output is as follows:
    SUCCESS: dblink.
    SUCCESS: pg_trgm.
    SUCCESS: pg_repack.
    SUCCESS: wal2json.
    SUCCESS: orafce.
    SUCCESS: pg_bulkload.
    SUCCESS: pg_prewarm.

orafce, dblink, pg_repack, pg_trgm, wal2json, pg_bulkload, pg_prewarm.

Copyright © 2011-2024 www.enmotech.com All rights reserved.