DEV Community

mmllllzcn
mmllllzcn

Posted on

Complete Guide to GBase Database Command-Line Installation on CentOS

Installing GBase Database(GBase 8s) from the command line is a practical approach for Linux servers, SSH-based deployment, and automated database provisioning.

This guide walks through the complete GBase Database installation process on CentOS 7/8, from system preparation and package installation to automatic instance configuration and verification.

System Requirements

Before installing GBase Database(GBase 8s), prepare a CentOS server with sufficient resources:

Item Minimum Recommended
OS CentOS 7+ CentOS 7.9/8.5
Memory 4 GB 64 GB
CPU 2 cores 8+ cores
Disk 100 GB 500 GB SSD
User root / gbasedbt gbasedbt for runtime

Step 1: Install Dependencies

Install the packages required by GBase Database:

yum install -y unzip libaio libgcc libstdc++ ncurses-devel \
    pam* jdk java-1.8.0-openjdk
Enter fullscreen mode Exit fullscreen mode

Verify the key packages:

rpm -q unzip libaio libstdc++
Enter fullscreen mode Exit fullscreen mode

Step 2: Create the GBase Database User

Create a dedicated gbasedbt operating system user for running the database instance:

useradd -m -d /home/gbasedbt -s /bin/bash gbasedbt
passwd gbasedbt

mkdir -p /opt/GBASE/gbase
chown -R gbasedbt:gbasedbt /opt/GBASE
Enter fullscreen mode Exit fullscreen mode

For production environments, follow your organization's password and account security policies.

Step 3: Extract the Installation Package

Upload the GBase Database(GBase 8s) installation package to the server and extract it:

cd /opt
tar -xzf GBase8sV3.3_2.0_x86_64.tar.gz
ls GBase8s/
Enter fullscreen mode Exit fullscreen mode

Make sure the extracted directory contains the installation program before continuing.

Step 4: Install GBase Database from the Command Line

Start the console installer:

cd /opt/GBase8s
./ids_install
Enter fullscreen mode Exit fullscreen mode

For a typical installation, select:

What type of installation do you want?
  1) Typical
  2) Compact
  3) Custom

Please enter a number [1]: 1
Enter fullscreen mode Exit fullscreen mode

Specify the installation directory:

Specify installation directory:

Enter fullscreen mode Exit fullscreen mode

If the instance will be created separately, select the option not to create a server instance during software installation.

Step 5: Run the GBase Database Initialization Script

This is where the installation becomes much simpler.

You do not need to manually configure environment variables, create the onconfig file, configure sqlhosts, select the database port, or initialize the instance one command at a time.

Switch to the gbasedbt user:

su - gbasedbt
Enter fullscreen mode Exit fullscreen mode

Then run the initialization script:

cd /opt/GBASE/gbase/etc/
sh GBaseInit_gbasedbt.sh
Enter fullscreen mode Exit fullscreen mode

The script guides you through the required configuration and automatically performs the necessary setup for the GBase Database instance.

Depending on the installation package and configuration, the script handles the relevant environment, instance, network, locale, and database initialization settings.

This means the overall workflow is much simpler than manually creating and maintaining every configuration file.

Step 6: Verify the GBase Database Installation

After the initialization script completes, verify that the environment and database instance are ready.

Check the main environment variables:

echo $GBASEDBTDIR
echo $GBASEDBTSERVER
echo $ONCONFIG
echo $GBASEDBTSQLHOSTS
Enter fullscreen mode Exit fullscreen mode

Then check the database instance:

onstat -
Enter fullscreen mode Exit fullscreen mode

The instance should report an online status when initialization has completed successfully.

You can also test database connectivity with:

dbaccess sysmaster -
Enter fullscreen mode Exit fullscreen mode

For a simple SQL test:

CREATE DATABASE test_db;

CREATE TABLE test_t (
    id INT,
    name VARCHAR(50)
);

INSERT INTO test_t VALUES (1, 'Hello GBase');

SELECT * FROM test_t;
Enter fullscreen mode Exit fullscreen mode

If the database and SQL operations work correctly, the GBase Database installation is ready for use.

Installation Verification Checklist

For repeatable deployments, basic verification can also be automated:

echo "=== GBase Database Installation Verification ==="

echo -n "1. oninit exists: "
[ -f "$GBASEDBTDIR/bin/oninit" ] && echo "PASS" || echo "FAIL"

echo -n "2. Instance status: "
onstat - 2>/dev/null | grep -q "On-Line" && echo "PASS" || echo "FAIL"

echo -n "3. SQLHOSTS configuration: "
[ -f "$GBASEDBTSQLHOSTS" ] && echo "PASS" || echo "FAIL"
Enter fullscreen mode Exit fullscreen mode

Final Thoughts

The command-line installation process for GBase Database(GBase 8s) is straightforward when you use the provided initialization script.

The key workflow is:

Install dependencies → Create the gbasedbt user → Install GBase Database → Run GBaseInit_gbasedbt.sh → Verify the instance.

The initialization script removes much of the manual configuration work, making the installation process easier to reproduce on remote Linux servers.

Once you are comfortable with this workflow, you can further automate GBase Database deployment with tools such as Ansible for repeatable server provisioning and environment setup.

Top comments (0)