CentOS使用docker安装OpenGauss数据库

1.搜索OpenGauss

docker search opengauss

2.选择其中一个源拉取

docker pull docker.io/enmotech/opengauss

3.运行OpenGauss

docker run --name opengauss --privileged=true --restart=always -d -e GS_USERNAME=postgres -e GS_PASSWORD=myGauss@2023 -p 5432:5432 docker.io/enmotech/opengauss

其中GS_USERNAME参数是数据库账号,GS_PASSWORD参数是数据库密码,--restart=always表示随系统开机启动。

4.停止OpenGauss

docker stop opengauss

5.启动OpenGauss

docker start opengauss

6.进入OpenGauss

进入容器

docker exec -it opengauss /bin/bash

切换到超级用户

su omm

连接OpenGauss

gsql

可以添加账号、配置权限等。

退出OpenGauss

\q

退出容器

exit

相关推荐
雨笋情缘44 分钟前
在 CentOS 7 系统中通过定时任务自动执行 Shell 脚本
centos·crontab
Web极客码1 小时前
CentOS 7.x如何快速升级到CentOS 7.9
linux·运维·centos
Lw老王要学习2 小时前
CentOS 7.9达梦数据库安装全流程解析
linux·运维·数据库·centos·达梦
CRUD酱2 小时前
CentOS的yum仓库失效问题解决(换镜像源)
linux·运维·服务器·centos
H Journey3 小时前
Docker Swarm集群管理
docker·集群管理·swarm
u0104058367 小时前
淘客返利系统的CI/CD流水线搭建:Docker镜像构建与K8s部署实践
ci/cd·docker·kubernetes
市场部需要一个软件开发岗位7 小时前
docker操作记录
运维·docker·容器
南墙上的石头7 小时前
docker日常使用命令汇总
docker·容器·rpc
小明_GLC7 小时前
Docker 构建镜像一直卡在下载 Python?
python·docker·容器
JY.yuyu7 小时前
Docker搭建Web安全渗透测试靶场
运维·docker·容器