安装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的其他选择?
发布于 2020-03-28 13:12:14
您只在服务器上安装了PostgreSQL客户端应用程序。为了安装服务器软件,您需要安装满足这些包依赖关系的postgresql-server包。之后,您可以按照本文档继续配置、配置和维护您的新数据库。
https://www.postgresql.org/download/linux/redhat/
正如您最初提到的,其要点很简单:
postgresql-setup initdb
systemctl enable postgresql.service --nowhttps://stackoverflow.com/questions/60845258
复制相似问题