【发布时间】:2020-09-23 01:09:54
【问题描述】:
安装 PostgreSQL 12:
sudo dnf install @postgresql:12
然后,添加附加功能的 contrib 包:sudo dnf install postgresql-contrib
之后,当我尝试初始化 PostgreSQL 数据库时:
sudo postgresql-setup initdb
我收到:sudo: postgresql-setup: command not found
另外,当我尝试检查状态时:
sudo systemctl status postgresql
收到此错误:Unit postgresql.service could not be found.
我做错了什么?如果这种安装方式不对,在centos上安装postgresql还有其他选择吗?
【问题讨论】:
-
对于 CentOS 8,您是否按照 postgresql.org/download/linux/redhat 的所有步骤操作?确保遵循此链接中的确切步骤。
-
你需要安装postgresql-server
标签: postgresql centos centos8 postgresql-12