DEV Community

mmllllzcn
mmllllzcn

Posted on

GBase Database(GBase 8c) Installation: The Four-Step Workflow from Trust to Deployment

Writing gbase.yml is only the beginning. Installing GBase Database(GBase 8c) requires four steps in a specific order: SSH trust setup, environment validation, environment repair, and cluster installation.

Each step has a different responsibility. Skipping one does not save time; it usually moves the troubleshooting cost to a later stage.

This guide walks through the complete GBase Database installation workflow, including commands, expected results, and four common installation mistakes.

1. Step One: Establish SSH Trust Between Nodes

Before running the installation, configure SSH trust between cluster nodes.

Navigate to the installation package's script directory:

cd /home/gbase/gbase_package/script/
Enter fullscreen mode Exit fullscreen mode

Run the trust setup command:

./gha_preinstall -s --root-passwd="***" --set-user-passwd="***" -f /home/gbase/gbase.yml
Enter fullscreen mode Exit fullscreen mode

The command establishes the required trust relationships for remote operations.

A successful execution prints a message similar to:

Add gbase trust ... successed
Enter fullscreen mode Exit fullscreen mode

Check that every node completes this operation.

If trust setup fails, do not immediately rerun the command. Check the following first:

  • Hostnames configured on each machine.
  • Corresponding entries in /etc/hosts.
  • Connectivity between cluster nodes.
  • SSH access on port 22.
  • Root and installation-user password settings.

Hostname resolution problems are a common reason why some nodes succeed while others remain unreachable.

2. Step Two: Run the 18 Environment Checks

After SSH trust is established, validate the target machines.

./gha_preinstall -i A -f /home/gbase/gbase.yml
Enter fullscreen mode Exit fullscreen mode

The -i A option runs 18 environment checks, covering system and kernel requirements, resource limits, memory settings, storage scheduling, network configuration, and other installation prerequisites.

The output identifies individual checks from A1 to A18.

A successful result should include:

Total numbers:18. Abnormal numbers:0.
Enter fullscreen mode Exit fullscreen mode

Pay attention to the difference between three result categories:

  • Normal: The requirement is satisfied.
  • Warning: A condition needs attention or documentation.
  • Abnormal: A requirement is not satisfied and must be resolved before installation.

An important distinction: passing all 18 checks does not guarantee that the cluster topology in gbase.yml is correct.

Environment validation answers whether the machines meet the installation requirements. It does not replace configuration review.

3. Step Three: Repair the Environment

The next command handles two specific security-related settings:

./gha_preinstall -i B -f /home/gbase/gbase.yml
Enter fullscreen mode Exit fullscreen mode

The -i B option covers only two checks:

Check Setting
B1 SELinux
B2 Firewall

It does not automatically repair other environment settings, including:

  • Swap configuration.
  • System resource limits.
  • Transparent Huge Pages (THP).
  • I/O scheduling.

This distinction matters because a successful -i B execution does not mean all environment issues have been fixed.

After completing the repair, run the environment checks again:

./gha_preinstall -i A -f /home/gbase/gbase.yml
Enter fullscreen mode Exit fullscreen mode

Verify the results rather than assuming that the repair command resolved every abnormal condition.

4. Step Four: Install GBase Database

Once SSH trust is established and the environment checks are satisfactory, start the cluster installation.

./gha_ctl install -p /home/gbase/ -c gbase
Enter fullscreen mode Exit fullscreen mode

Understand the two parameters:

  • -p: The directory containing the deployment configuration file.
  • -c: The cluster name, which must match the configuration filename.

For example, with a configuration file named gbase.yml, the cluster name is gbase.

A successful installation returns:

{"ret":0,"msg":"Success"}
Enter fullscreen mode Exit fullscreen mode

This indicates that the installation command completed successfully.

It is still necessary to verify the cluster status and service connectivity before declaring the deployment accepted.

5. Four Common GBase Database Installation Errors

Even when following the four-step workflow, several mistakes frequently cause unnecessary troubleshooting.

Error 1: Mixing Command-Line Options

Do not confuse the parameters used by different gha_preinstall operations.

For example, -f specifies the configuration file. Options such as -h, -u, and -p have different meanings and should not be substituted for it.

Always check the command syntax for the specific operation.

Error 2: Cluster Name Does Not Match the Configuration Filename

If the configuration file is gbase.yml, the installation command should use:

./gha_ctl install -p /home/gbase/ -c gbase
Enter fullscreen mode Exit fullscreen mode

A mismatched cluster name can prevent the installer from locating the intended configuration.

Error 3: The Installation Directory Is Not Empty

Check the prefix directory in gbase.yml before installation.

If the directory contains data from a previous installation, initialization may stop.

Verify its contents, ownership, and intended use before proceeding. Do not blindly delete an existing directory that might contain data worth preserving.

Error 4: Command Not Found After Installation

After installation, an engineer may try running a GBase Database command and receive:

command not found
Enter fullscreen mode Exit fullscreen mode

One possible cause is that the shell environment variables have not been loaded.

For the current shell session, run:

source ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

Then retry the command.

6. Understand the Failure Signature of Each Step

Knowing which stage failed makes troubleshooting faster.

Stage Typical failure First thing to check
SSH trust Node unreachable or trust setup failure Hostnames, /etc/hosts, SSH credentials
Environment checks Abnormal A1–A18 results OS, swap, limits, THP, I/O scheduling
Environment repair Some checks remain abnormal Remember that -i B only handles SELinux and firewall
Installation Initialization or configuration error prefix, cluster name, configuration path

The four stages are connected, but they are not interchangeable.

Trust setup enables remote operations. Environment checks establish machine readiness. Repair handles the two supported security settings. Installation uses the configuration to deploy the cluster.

7. The Correct Order Makes Deployment Predictable

The GBase Database(GBase 8c) installation workflow follows a straightforward sequence:

  1. Establish SSH trust with gha_preinstall -s.
  2. Validate the environment with gha_preinstall -i A.
  3. Repair SELinux and firewall settings with gha_preinstall -i B.
  4. Run gha_ctl install.

The order matters because every step prepares the conditions required by the next.

Running installation before validating the environment can turn a simple configuration issue into a much more expensive cleanup and reinstallation task.

The goal is not merely to get a successful installation response. It is to ensure that GBase Database is installed on qualified machines with the intended configuration.

A predictable GBase Database deployment starts with four commands, but succeeds because each command is run for the right reason.

Top comments (0)