Executing Installation
After the openGauss installation environment is prepared by executing the pre-installation script, deploy openGauss based on the installation process.
Prerequisites
- You have successfully executed the gs_preinstall script. that is, you have completed operations described in Creating the Required User Account and Configuring the Installation Environment.
- All the server OSs and networks are functioning properly.
- You have checked that the locale parameter for each server is set to the same value.
Procedure
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.
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.
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"
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
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.