Executing Installation

After the openGauss installation environment is prepared by executing the pre-installation script, deploy openGauss based on the installation process.



  1. Check whether the installation package and openGauss configuration file exist in the planned path. If they do not exist, perform the preinstallation again to ensure that the preinstallation is successful, and then perform the following steps.

  2. Log in to any host of the openGauss and switch to the omm user.

    su - omm


    • omm indicates the user specified by the -U parameter in the gs_preinstall script.
    • You need to execute the gs_install script as user omm specified in the gs_preinstall script. Otherwise, an execution error will be reported.
    • openGauss compiled on the HiSilicon chip of a later version cannot run on the server with the HiSilicon chip of an earlier version. For example, the openGauss compiled on the Hi1620 cannot run on the Hi1616 environment.
  3. Use gs_install to install the openGauss. If the cluster is installed in environment variable separation mode, run the source command to obtain the environment variable separation file ENVFILE.

    gs_install -X /opt/software/openGauss/cluster_config.xml

    /opt/software/openGauss/cluster_config.xml is the path of the openGauss configuration file. During the execution, you need to enter the database password as prompted. The password must meet complexity requirements. To ensure that you can use the database properly, remember the entered database password.

    The password must meet the following complexity requirements:

    • Contain at least eight characters.
    • Cannot be the same as the username, the current password (ALTER), or the current password in an inverted sequence.
    • Contain at least three of the following: uppercase characters (A to Z), lowercase characters (a to z), digits (0 to 9), and other characters (limited to ~!@#$%^&*()-_=+\|[{}];:,<.>/?).

    The SSL certificate is generated during the installation. The certificate is stored in {gaussdbAppPath}/share/sslcert/om, where {gaussdbAppPath} is the program installation directory specified in the openGauss configuration file of the cluster.

    Two files are generated under the log file path: gs_install-YYYY-MMDD_HHMMSS.log and gs_local-YYYY-MM-DD_HHMMSS.log.


    • Character set names are case-insensitive, for example, the following values are supported by openGauss: gbk and GBK; UTF-8, UTF8, uft8, and utf-8; and Latine1 and latine1.
    • If no character set is specified during installation, the default character set SQL_ASCII is used. To simplify and unify the locale, the default locale is C. If you want to specify another character set and locale, use the --gsinit-parameter="--locale=LOCALE" parameter during installation. The LOCALE parameter specifies the default locale for the new database. For example, to set the database encoding format to UTF-8, perform the following steps: Run the locale -a |grep utf8 command to check the locale that supports UTF-8 encoding:
    omm@linux:~>  locale -a|grep utf8

    Information similar to the following is displayed, where en_US.utf8 indicates that the en_US locale supports the UTF-8 encoding format.


    Select a locale as required, for example, en_US.utf8. Add the --locale=en_US.utf8 option when initializing the database for installation. The following is an example:

    gs_install -X /opt/software/openGauss/cluster_config.xml --gsinit-parameter="--locale=en_US.utf8"
  4. After the installation is successful, manually delete the trust between users root on the host, that is, delete the mutual trust file on each openGauss database node.

    rm –rf ~/.ssh

Directories Generated After the Installation

Table 1 describes the directories generated after the installation and the files in the directories.

Table 1 Directories generated after the installation


Directory Description





openGauss installation directory



Stores binary files of the database.


Stores the configuration file of the Cgroup tool.


Stores the header file required for running the database.


Stores library files of the database.


Stores common files required for database running, such as the configuration file template.


openGauss data directory



Stores database node data. For the primary node, the directory name is data_dnxxx.

For the standby node, the directory name is data_dnSxxx. xxx indicates the database node number.


openGauss log directory



Stores logs of binary programs.


Stores database kernel performance logs.


Stores OM logs. For example:

It contains logs for executing some local scripts, as well as adding and deleting database node interfaces, gs_om interfaces, pre-installation interfaces, and node replacement interfaces.


Stores database audit logs.


Directory for storing run logs of database node instances.


openGauss system tool directory



Stores script files for openGauss users to manage openGauss.


Stores the library files that the binaries in the bin directory depend on.


openGauss temporary file directory



Stores temporary files.


Execute the installation.

omm@plat1:~> gs_install -X /opt/software/openGauss/cluster_config.xml
Parsing the configuration file.
Check preinstall on every node.
Successfully checked preinstall on every node.
Creating the backup directory.
Successfully created the backup directory.
begin deploy..
Installing the cluster.
begin prepare Install Cluster..
Checking the installation environment on all nodes.
begin install Cluster..
Installing applications on all nodes.
Successfully installed APP.
begin init Instance..
encrypt ciper and rand files for database.
Please enter password for database:
Please repeat for database:
begin to create CA cert files
The sslcert will be generated in /opt/gaussdb/cluster/app/share/sslcert/om
Cluster installation is completed.
Deleting instances from all nodes.
Successfully deleted instances from all nodes.
Checking node configuration on all nodes.
Initializing instances on all nodes.
Updating instance configuration on all nodes.
Check consistence of memCheck and coresCheck on DN nodes.
Successful check consistence of memCheck and coresCheck on all nodes.
Configuring pg_hba on all nodes.
Configuration is completed.
Successfully started cluster.
Successfully installed application.


If the installation fails, troubleshoot the problem based on logs in the gs_install-YYYY-MM-DD_HHMMSS.log and gs_local-YYYY-MM-DD_HHMMSS.log files in the openGauss log directory.

编组 3备份
    openGauss 2024-05-24 00:42:44