This content originally appeared on DEV Community and was authored by Özcan Kara
cd /opt/
source gsql_env.sh
mkdir -p /opt/expt/db/libs
cd /opt/expt/db/libs
wget https://sandbox-expriment-files.obs.cn-north-1.myhuaweicloud.com/20220525/opengaussjdbc.jar
wget https://labfiles-singapore.obs.ap-southeast-3.myhuaweicloud.com/OpenJDK11U-jdk_x64_linux_openj9_linuxXL_11.0.10_9_openj9-0.24.0.tar.gz
tar xzvf OpenJDK11U-jdk_x64_linux_openj9_linuxXL_11.0.10_9_openj9-0.24.0.tar.gz
mv jdk-11.0.10+9 /usr/lib/
ln -s /usr/lib/jdk-11.0.10+9/bin/java /usr/local/bin/java
ln -s /usr/lib/jdk-11.0.10+9/bin/javac /usr/local/bin/javac
java -version
wget https://sandbox-expriment-files.obs.cn-north-1.myhuaweicloud.com:443/20220525/GaussDB_opengauss_client_tools.zip
unzip GaussDB_opengauss_client_tools.zip
cd GaussDB_opengauss_client_tools/Euler2.8_arm_64/
tar -xvf GaussDB-Kernel-V500R001C20-EULER-64bit-gsql.tar.gz
source gsql_env.sh
gsql -h *Private IP address* -U root -d postgres -p 8000 -W yourpassword -r
\q
gsql --help
gsql -h *Private IP address* -U root -d postgres -p 8000 -W yourpassword -r
\help CREATE DATABASE
gsql -h *Private IP address* -U root -d postgres -p 8000 -W yourpassword -l
gsql -V
gsql -h *Private IP address* -U root -d postgres -p 8000 -W yourpassword -q
create table t_test (firstcol int);
insert into t_test values(200);
select * from t_test;
This content originally appeared on DEV Community and was authored by Özcan Kara