Step 3: Installing, Configuring, and Starting GDS on a Data Server
This topic describes how to install, configure, and start GDS on the servers where source data files are stored. Then you can connect GDS to GaussDB(DWS) to import data.
- Before using GDS to import or export data, perform the "Preparing an ECS as the GDS Data Server" and "Downloading the GDS Package and SSL Certificate" operations in Step 1: Preparing an ECS as the GDS Server.
- Log in as user root to the data server (192.168.0.90) where GDS is to be installed and run the following command to create the /opt/bin/dws directory for storing the GDS package:
mkdir -p /opt/bin/dws - Upload the GDS package to the created directory.
Use the SUSE Linux package as an example. Upload the GDS package dws_client_redhat_x64.tar.gz to the directory created in the previous step.
- Go to the new directory and decompress the package.
cd /opt/bin/dws/gds tar -zxvf dws_client_redhat_x64.tar.gz
- (Optional) If SSL is used, upload the SSL certificate to the directory created in 2.
- Create the user gds_user and the user group gdsgrp it belongs to. 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
- 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
- Switch to user gds_user.
su - gds_user
- Start the GDS.
- If SSL encryption is not used, run the following command to start GDS:
/opt/bin/dws/gds/gds -d /input_data/ -p 192.168.0.90:5000 -H 10.10.0.1/24 -l /opt/bin/dws/gds/gds_log.txt -D
- If SSL is enabled, run the following command to start GDS after performing 5:
/opt/bin/dws/gds/gds -d /input_data/ -p 192.168.0.90:5000 -H 10.10.0.1/24 -l /opt/bin/dws/gds/gds_log.txt -D --enable-ssl --ssl-dir /opt/bin/dws/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(DWS). 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 GaussDB(DWS) to access GDS for data import. Ensure that the network segment covers all hosts in GaussDB(DWS).
- -l log_file: GDS log directory and log file name. It is /opt/bin/dws/gds/gds_log.txt in this tutorial.
- -D: GDS in daemon mode. This parameter is used only in Linux.
- --enable-ssl: enables SSL for data transmission.
- --ssl-dir: directory storing the SSL certificate. Set it to the certificate directory mentioned in 5.
- If SSL encryption is not used, run the following command to start GDS:
Last Article: Step 2: Preparing Source Data
Next Article: Step 4: Creating a Foreign Table in the GaussDB(DWS) Database
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.