CentOS 7

一,用yum安装PostgreSQL 。

选择安装版本和服务器平台后,执行安装命令,例如我要安装是9.6版本,平台是CentOS 7。

https://www.postgresql.org/download/linux/redhat/#yum

安装过程从上面链接4-7。

二,重新启动后,在shell里面输入命令:

su - postgres

如果正常,系统会显示一个shell提示信息。随后在输入:

psql

则会进入PostgreSQL的客户端管理工具。退出命令:q

参考:

https://www.postgresql.org/download/linux/redhat/#yum

https://www.cnblogs.com/sfnz/p/7908380.html

https://blog.csdn.net/Post_Yuan/article/details/78603212

原文地址:https://www.cnblogs.com/sunylat/p/10796956.html