Executing Installation

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

Prerequisites

Procedure

  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.

    NOTE:

    User omm must have the permission on the directory and subdirectories where the installation package is stored.

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

    su - omm
    

    NOTE:

    • 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 database 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 user 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 8~16 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.

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

    NOTE:

    • Character set names are case-insensitive, for example, the following values are supported by openGauss: gbk and GBK; UTF-8, UTF8, utf8, 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.

    ...... 
    en_SG.utf8 
    en_US.utf8 
    ......
    

    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

No.

Directory Description

Directory

Subdirectory

Remarks

1

openGauss installation directory

/opt/huawei/install/app

bin

Stores binary files of the database.

etc

Stores the configuration file of the Cgroup tool.

include

Stores the header file required for running the database.

lib

Stores library files of the database.

share

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

2

openGauss data directory

/opt/huawei/install/data/dn

data_dnxxx

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.

3

openGauss log directory

/var/log/omm/username

bin

Stores logs of binary programs.

gs_profile

Stores database kernel performance logs.

om

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.

pg_audit

Stores database audit logs.

pg_log

Directory for storing run logs of database node instances.

4

openGauss system tool directory

/opt/huawei/install/om

script

Stores script files for openGauss users to manage openGauss.

lib

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

5

openGauss temporary file directory

/opt/huawei/tmp

-

Stores temporary files.

Examples

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.
Configuring.
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.

Troubleshooting

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.

Feedback
编组 3备份
    openGauss 2024-12-22 00:53:44
    cancel