ToB企服应用市场:ToB评测及商务社交产业平台

标题: initdb: error: The program “postgres“ is needed by initdb but was no [打印本页]

作者: 光之使者    时间: 2024-7-27 07:15
标题: initdb: error: The program “postgres“ is needed by initdb but was no
PG启动报错

[root@localhost data]# docker logs postgres
popen failure: Cannot allocate memory
initdb: error: The program “postgres” is needed by initdb but was not found in the
same directory as “/usr/lib/postgresql/12/bin/initdb”.
Check your installation.

但是换个镜像就没题目,应该是镜像跟体系不匹配吧,发起换镜像吧
docker pull postgres:bullseye
拉取镜像
  1. docker pull postgres:12.17-bullseye
复制代码
启动镜像
  1. docker run --name postgres1217 -e POSTGRES_PASSWORD=PGdata@456  -p 5432:5432 -v /data/postgres/postgresql/data:/var/lib/postgresql/data -d postgres:12.17-bullseye
复制代码
查看容器状态

  1. docker ps -a
复制代码
开放端口

  1. firewall-cmd --add-port=5432/tcp
  2. firewall-cmd --add-port=5432/tcp --permanent
复制代码
链接测试



免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) Powered by Discuz! X3.4