Preparing the Software and Hardware Installation Environment

This section describes the preparations for installation.

Software and Hardware Requirements

This section describes hardware and software requirements of openGauss. It is recommended that servers to be deployed on openGauss have the same software and hardware configurations.

Hardware Requirements

Table 1 lists the minimum hardware requirements of the openGauss server. When planning the hardware configuration of a product, consider the data scale and expected database response speed. Plan hardware as required.

Table 1 Hardware requirements

Item

Configuration Description

Memory

It is recommended that the memory be 32 GB or above for function debugging.

In performance tests and commercial deployment, it is recommended that the memory be 128 GB or above for single-instance deployment.

Complex queries require much more memory, and therefore, the memory may be insufficient in high-concurrency scenarios. In this case, it is recommended that a large-memory server or load management be used to restrict concurrency on the system.

CPU

It is recommended at least one 8-core 2.0 GHz CPU be used for function debugging.

In performance tests and commercial deployment, it is recommended that one 16-core 2.0 GHz CPU be used.

You can set CPUs to hyper-threading or non-hyper-threading mode.

NOTE:

For individual developers, the minimum configuration is 2 cores and 4 GB memory, and the recommended configuration is 4 cores and 8 GB memory.

Currently, openGauss supports only the CPUs of Kunpeng servers and x86_64-based universal PC servers.

Disk

Hard disks used for installing openGauss must meet the following requirements:

  • At least 1 GB is used to install the openGauss applications.
  • About 300 MB is used for each host to store metadata.
  • More than 70% of available disk space is reserved to store data.

You are advised to configure the system disk to RAID 1 and data disk to RAID 5 and plan four groups of RAID 5 data disks for installing openGauss. For details about RAID configuration, see the instructions in the hardware vendors' manuals. Set Disk Cache Policy to Disabled to avoid data loss upon unexpected power-off.

openGauss supports using an SSD with the SAS interface and NVMe protocol deployed in RAID mode as the primary storage device of the database.

Network

Minimum 300 Mbit/s Ethernet is required.

You are advised to bond two NICs for redundancy. For details about NIC redundancy bond configuration, see the instructions in the hardware vendors' manuals.

Software Requirements

Table 2 Software requirements

Software

Configuration Description

Linux OS

  • ARM:
    • openEuler 20.3LTS (recommended)
    • Kirin V10
  • x86:
    • openEuler 20.3LTS
    • CentOS 7.6
      NOTE:

      Ensure that the OS language is set to English; otherwise, the installation package cannot be installed properly.

Linux file system

It is recommended that the number of remaining inodes be greater than 1.5 billion.

Tool

bzip2

Software Dependency Requirements

Table 3 describes the openGauss software dependency requirements.

You are advised to use the default installation packages of the following dependent software in the listed OS installation CD-ROMs or sources. If the following software does not exist, refer to the recommended versions of the software.

Table 3 Software dependency requirements

Software

Recommended Version

libaio-devel

0.3.109-13

flex

2.5.31 or later

bison

2.7-4

ncurses-devel

5.9-13.20130511

glibc-devel

2.17-111

patch

2.7.1-10

redhat-lsb-core

4.1

readline-devel

7.0-13

libnsl (in the openEuler + x86 environment)

2.28-36

Modifying OS Configuration

Disabling the OS Firewall

To ensure that openGauss can work properly when the firewall is enabled, openGauss-related services, protocols, IP addresses, and ports need to be added to the firewall whitelist of the openGauss host.

Take openEuler OS as an example. Assume that the openGauss information is listed in Table 4.

Table 4 openGauss information

Host Name

Internal IP Address

External IP Address

plat1

192.168.0.11

10.10.0.11

Management network

-

10.10.64.236

Currently, the installation can be performed only when the firewall is disabled.

  1. Set the value of SELINUX in the /etc/selinux/config file to disabled.

    1. Run the vim command to open the config file.

      vim /etc/selinux/config
      
    2. Change the value of SELINUX to disabled and run the :wq command to save the change and exit.

      SELINUX=disabled
      
  2. Restart the OS.

    reboot
    
  3. Check whether the firewall is disabled.

    systemctl status firewalld
    

    If the firewall status is active (running), the firewall is not disabled. Go to step 4.

    If the firewall status is inactive (dead), you do not need to disable the firewall.

  4. Disable the firewall service.

    systemctl disable firewalld.service
    systemctl stop firewalld.service
    
  5. Repeat steps 1 to 4 on other hosts.

Setting Character Set Parameters

Set the same character set for all database nodes. You can add export LANG=Unicode to the /etc/profile file.

vim /etc/profile

Setting the Time Zone and Time

Ensure that the time zone and time on each database node are consistent.

  1. Run the following command to check whether the time and time zone of each database node are consistent: If the time and time zone of each database node are inconsistent, perform steps 2 to 3.

    date
    
  2. Run the following command to copy the /etc/localtime file to the /usr/share/zoneinfo/ directory of each database node:

    cp /usr/share/zoneinfo/$Locale/$Time zone /etc/localtime
    

    NOTE: $Locale/$Time zone indicates the locale and time zone to be set, for example, Asia/Shanghai.

  3. Run the date -s command to set the time of each database node to the same time. For example:

    date -s "Sat Sep 27 16:00:07 CST 2020"
    

(Optional) Disabling the Swap Memory

NOTE: Disabling the swap memory ensures the access performance of the database and prevents the buffer memory of the database from being evicted to the disk. If the server memory is small and the memory is overloaded, you can enable the swap memory to ensure normal running.

Run the swapoff -a command on each database node to disable the swap memory.

swapoff -a

Disabling RemoveIPC

On each database node, disable RemoveIPC. For CentOS, skip this step.

  1. Change the value of RemoveIPC in the /etc/systemd/logind.conf file to no.

    1. Run the vim command to open the logind.conf file.

      vim  /etc/systemd/logind.conf
      
    2. Change the value of RemoveIPC to no.

      RemoveIPC=no
      
  2. Change the value of RemoveIPC in the /usr/lib/systemd/system/systemd-logind.service file to no.

    1. Run the vim command to open the systemd-logind.service file.

      vim /usr/lib/systemd/system/systemd-logind.service
      
    2. Change the value of RemoveIPC to no.

      RemoveIPC=no
      
  3. Reload configuration parameters.

    systemctl daemon-reload
    systemctl restart systemd-logind
    
  4. Check whether the modification takes effect.

    loginctl show-session | grep RemoveIPC
    systemctl show systemd-logind | grep RemoveIPC
    
  5. Repeat steps 1 to 4 on other hosts.

Feedback
编组 3备份
    openGauss 2024-05-06 00:44:54
    cancel