docker部署openGauss

docker部署openGauss

参考

  https://hub.docker.com/r/enmotech/opengauss-lite

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

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

  https://www.cnblogs.com/techbing/p/18266600

正文

  最近因为某种需求,需要本地部署一份开源高斯数据库,然而搜索到的方案部署完成后均无法使用。

  现将最终结果分享。

  1. 使用 opengauss/opengauss

    如果需要navicat或其他开源postgres连接

    1. 本地必须预先安装gsql工具
    2. 在 /var/lib/opengauss/data 目录中修改 postgresql.conf 的 password_encryption_type​ 为1
    3. 重启数据库
    4. 客户端登录,修改一次密码
    5. 在 /var/lib/opengauss/data 目录中修改 pg_hba.conf 文件,将登录类型改为md5 (最好是根据用户新建一个)
    6. 重启数据库
    docker run --name opengauss --privileged=true -d -e GS_PASSWORD=openGauss@123 opengauss/opengauss:5.0.0  -p 5432:5432
    gsql -d postgres -U gaussdb -W 'openGauss@123' -h host_ip -p 5432
    
  2. 使用enmotech/opengauss-lite 默认navicat就能连上

    docker run -d --name opengauss --privileged -e GS_PASSWORD=openGauss@123 -p 5432:5432 -u root enmotech/opengauss-lite:latest 
    

  注意:opengauss运行后就是会有一堆报错信息,只要容器没退出就是正常的。

opengauss报错信息

使用

  1. 通过navicat连接navicat连接高斯数据库

  ‍

posted @ 2024-12-11 20:13  铁流是宝宝  阅读(60)  评论(0编辑  收藏  举报