Step 2: Installing, Configuring, and Starting GDS on a Data Server
Obtaining the Driver Package
Download particular packages listed in Table 1 based on the version of your instance.
To prevent a software package from being tampered with during transmission or storage, download the corresponding verification package and perform the following steps to verify the software package:
- Upload the software package and verification package to the same directory on a Linux VM.
- Run the following command to verify the integrity of the software package:
cat GaussDB_driver.zip.sha256 | sha256sum --check
If OK is displayed in the command output, the verification is successful.
GaussDB_driver.zip: OK
Before data import, install, configure, and start GDS on the servers where source data files are stored. Then you can connect GDS to GaussDB to import data.
- Log in to the data server 192.168.0.90 where GDS is to be installed, and create user gds_user and its user group gdsgrp. This user is used to start GDS and must have the permission to read the source data file directory.
groupadd gdsgrp useradd -g gdsgrp gds_user
- Switch to user gds_user.
su - gds_user
- Create the /opt/bin directory for storing the GDS package.
mkdir -p /opt/bin
- Change the owner of the GDS package and source data file directory to gds_user and the user group to gdsgrp.
chown -R gds_user:gdsgrp /opt/bin chown -R gds_user:gdsgrp /input_data
- Upload the GDS package to the created directory.
Use the Euler Linux tool package as an example. Upload the GDS package GaussDB-Kernel-VxxxRxxxCxx-xxxxx-64bit-Gds.tar.gz in the software package to the created directory.
Download link of GaussDB-Kernel-VxxxRxxxCxx-xxxxx-64bit-Gds.tar.gz: Driver package
- Run the following commands to go to the directory and decompress the package:
cd /opt/bin tar -zxvf GaussDB-Kernel-VxxxRxxxCxx-xxxxx-64bit-Gds.tar.gz export LD_LIBRARY_PATH="/opt/bin/lib:$LD_LIBRARY_PATH" // GDS depends on the Cjson dynamic library. Therefore, you need to configure the path of the dynamic library.
- (Optional) If SSL is used, upload the SSL certificate to the directory created in 1.
The SSL certificate is stored in the $GAUSSHOME/share/sslcert/gds directory of GaussDB.
In this example, $GAUSSHOME of the GaussDB server (192.168.10.60) is /opt/huawei/Bigdata/gaussdb/core. You can download the SSL certificate to the /opt/bin directory for GDS by using the following command:
scp -r root@192.168.10.60:/opt/huawei/Bigdata/gaussdb/core/share/sslcert/gds ./
- Start the GDS.
- If SSL is not enabled, run the following command to start GDS:
/opt/bin/gds/gds -d /input_data/ -p 192.168.0.90:5000 -H 10.10.0.1/24 -l /opt/bin/gds/gds_log.txt -D --enable-ssl off
- If SSL encryption is used, run the following command to start GDS after performing 7:
/opt/bin/gds/gds -d /input_data/ -p 192.168.0.90:5000 -H 10.10.0.1/24 -l /opt/bin/gds/gds_log.txt -D --enable-ssl on --ssl-dir /opt/bin/gds
Replace the italic parts as required.
- -d dir: directory storing data files that contain data to be imported. It is /input_data/ in this tutorial.
- -p ip:port: listening IP address and port for GDS. The default value is 127.0.0.1. Replace it with the IP address of a 10GE network that can communicate with GaussDB. The listening port can be any one ranging from 1024 to 65535. The default port is 8098. This parameter is set to 192.168.0.90:5000 in this tutorial.
- -H address_string: network segment for hosts that can connect to and use GDS. The value must be in CIDR format. Set this parameter to enable the GaussDB instance to access GDS for data import. Ensure that the network segment covers all hosts in the GaussDB instance.
- -l log_file: GDS log directory and log file name. This parameter is set to /opt/bin/gds/gds_log.txt in this tutorial.
- -D: GDS in daemon mode. This parameter is used only in Linux.
- --enable-ssl: Data transmission in SSL encryption mode. By default, the SSL encryption mode is enabled. If this parameter is not used, you need to add --ssl-dir to specify the SSL certificate directory.
- --ssl-dir: SSL certificate directory. Set it to the certificate directory mentioned in 7.
- If SSL is not enabled, run the following command to start GDS:
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot