Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增支持华为 openGauss-高斯数据库开源版,高可用、高性能、高安全、高弹性、高智能、易部署、易迁移 #795

Open
TommyLemon opened this issue Feb 9, 2025 · 0 comments
Labels

Comments

@TommyLemon
Copy link
Collaborator

TommyLemon commented Feb 9, 2025

Description

Image

Image

https://hub.docker.com/r/opengauss/opengauss

docker run --name opengauss --privileged=true -d -e GS_PASSWORD=openGauss@123 -p 5432:5432 opengauss/opengauss:5.0.0

docker exec -it opengauss bash

yum install json-c # 或 apt-get update && apt-get install libjson-c1

find / -name "libjson-c.so*"
ln -s /usr/lib64/libjson-c.so.5 /usr/lib64/libcjson.so.1  # 也可能是 libjson-c.so.4 或其它版本,根据上个命令查看
ldconfig

export LD_LIBRARY_PATH=/usr/local/opengauss/lib:$LD_LIBRARY_PATH
export PATH=/usr/local/opengauss/bin:$PATH

gsql -d postgres -U opengauss -W 'openGauss@123' -h localhost -p 5432

CREATE USER postgres WITH PASSWORD 'openGauss@123';
GRANT ALL PRIVILEGES ON DATABASE postgres TO postgres;

新开命令行终端窗口:

docker exec -it opengauss bash

yum install json-c # 或 apt-get update && apt-get install libjson-c1

find / -name "libjson-c.so*"
ln -s /usr/lib64/libjson-c.so.5 /usr/lib64/libcjson.so.1  # 也可能是 libjson-c.so.4 或其它版本,根据上个命令查看
ldconfig

export LD_LIBRARY_PATH=/usr/local/opengauss/lib:$LD_LIBRARY_PATH
export PATH=/usr/local/opengauss/bin:$PATH

gsql -d postgres -U postgres -W 'openGauss@123' -h localhost -p 5432

GRANT ALL PRIVILEGES ON DATABASE postgres TO postgres;
\c postgres;
create schema sys;
SET search_path TO sys, public;

GRANT USAGE ON SCHEMA sys TO postgres;
ALTER DEFAULT PRIVILEGES IN SCHEMA sys GRANT SELECT ON TABLES TO postgres;

导入 APIJSON-Demo/PostgreSQL 目录下的 apijson_uesr, Comment 等表

https://mvnrepository.com/artifact/org.opengauss/opengauss-jdbc/6.0.0-og

<dependency>
    <groupId>org.opengauss</groupId>
    <artifactId>opengauss-jdbc</artifactId>
    <version>6.0.0-og</version>
</dependency>

https://docs.opengauss.org/en/docs/latest/docs/GettingStarted/installation.html#Preparing-Installation.html
https://docs.opengauss.org/en/docs/latest/docs/GettingStarted/gsql-connection-and-usage.html
https://docs.opengauss.org/en/docs/latest/docs/DeveloperGuide/jdbc-package-driver-class-and-environment-class.html
https://docs.opengauss.org/en/docs/latest/docs/DeveloperGuide/connecting-to-a-database-JDBC.html

@TommyLemon TommyLemon changed the title 新增支持 openGauss-华为高斯数据库开源版 新增支持 openGauss-华为高斯数据库开源版,高可用、高性能、高安全、高弹性、高智能、易部署、易迁移 Feb 9, 2025
@TommyLemon TommyLemon changed the title 新增支持 openGauss-华为高斯数据库开源版,高可用、高性能、高安全、高弹性、高智能、易部署、易迁移 新增支持华为 openGauss-高斯数据库开源版,高可用、高性能、高安全、高弹性、高智能、易部署、易迁移 Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant