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 Lite. It is recommended that servers to be deployed on openGauss Lite have the same software and hardware configurations.

Hardware Requirements

Table 1 describes the minimum hardware requirements of openGauss Lite. 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 size of a single instance be greater than 4 GB.

NOTE:
  • If the database and other applications run on the server at the same time, it is recommended that you set the value of shamax to half of the physical memory size. If only the database runs on the server, it is recommended that you set the value of shamax to 80% of the physical memory size.
  • If the memory usage increases due to a database exception and reaches the upper limit 4 GB, an OOM occurs. After OOM, the database stops and does not respond to services.

CPU

One 8-core 2.0 GHz CPU is recommended. Model: 2658A v3; specifications: 4 GB

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

Disk

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

Disk space: 120 GB

Network Requirements

Minimum 300 Mbit/s Ethernet is required.

You are advised to bond two NICs for redundancy. The configuration is not described in this document. You can configure it by following instructions in the manual provided by the hardware manufacturer.

Software Requirements

Table 2 Software requirements

Software

Configuration Description

Linux OS

  • Arm:
    • openEuler 20.03 LTS
  • x86:
    • Centos 7.6
    • openEuler 20.03 LTS

Linux file system

The ext4 file system is recommended for openEuler.

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

Tool

bzip2

Python

  • Python 3.6 or later

Software Dependency Requirements

Table 3 lists the software dependency requirements for openGauss Lite.

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

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

readline-devel

7.0-13

libnsl

2.28-36

libaio-devel

Recommended version: 0.3 or later

Modifying OS Configuration

Disabling the OS Firewall

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

openEuler is used as an example, the openGauss Lite information is as shown 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. Change the value of SELINUX in the /etc/selinux/config file to disabled.

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

    vim /etc/selinux/config
    

    b. 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 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 not, 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.

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

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

    vim  /etc/systemd/logind.conf
    

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

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

    vim /usr/lib/systemd/system/systemd-logind.service
    

    b. 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 Step 1 (#en-us_topic_0283136490_en-us_topic_0241802566_li17785744466) to Step 4 (#en-us_topic_0283136490_en-us_topic_0241802566_li17785744467) on other hosts.

Disabling the History Command

NOTE:

To prevent security risks caused by historical records, you need to disable the history command on each host.

Step 1 Modify the /etc/profile file in the root directory.

vim /etc/profile

Step 2 Set HISTSIZE to 0. For example, if the default value of HISTSIZE is 1000, change it to 0.

HISTSIZE=0

Step 3 Save the /etc/profile file.

:wq

Step 4 Make the /etc/profile file take effect.

source /etc/profile

—-End

Setting Remote Login as User root

During the openGauss installation, the user root is required for remote login. This section describes how to set the user root for remote login.

NOTE:

The remote connection function is enabled only when mutual trust between users root is required in the database. After the operations and verifications are complete on each host, log out of the system as user root in a timely manner to prevent misoperations.

  1. Modify the PermitRootLogin configuration to enable remote login of user root.

    a. Open the sshd_config file.

    vim /etc/ssh/sshd_config
    

    b. Modify permissions of user root using either of the following methods:

    • Comment out PermitRootLogin no.

      #PermitRootLogin no
      
    • Change the value of PermitRootLogin to yes.

      PermitRootLogin yes
      

    c. Run the :wq command to save the modification and exit.

  2. Modify the Banner configuration to delete the welcome information displayed when you connect to the system. The welcome information affects the return result of remote operations during the installation.

    a. Edit the sshd_config file.

    vim /etc/ssh/sshd_config
    

    b. Comment out the line where Banner is.

    #Banner XXXX
    

    c. Run the :wq command to save the modification and exit.

  3. Run the following command to validate the settings:

    systemctl restart sshd.service
    
  4. Re-log in to the system as user root.

    ssh xxx.xxx.xxx.xxx
    

    NOTE:

    xxx.xxx.xxx.xxx is the IP address for installing the openGauss environment.

Feedback
编组 3备份
    openGauss 2024-05-07 00:46:52
    cancel