【Linux】安装 PostgreSQL

参考:

  CSDN1:https://blog.csdn.net/ctwy291314/article/details/79900074

1、进入 PostgreSQL 官网的下载地址

 

2、选择下面的安装流程,因为我这里是 CentOS 7系统,所以选择的是 Red Hat

 

 3、选择后,在红色框下面选择 想要安装的版本号

  (a)、repository RPM 是什么,点击下面两个连接
      Linux公社1:https://www.linuxidc.com/Linux/2013-03/81587.htm

      CSDN1:https://blog.csdn.net/xfxfxfxfxf666/article/details/80632417

4、可以通过下面的命令查看是否启动了

netstat -a | grep PGSQ

5、连接数据库

  (a)、先切换到数据库用户

su - postgres

  (b)、登录数据库

psql

  (c)、查看 用户角色 

\du 或者 \du+

  (d)、修改用户 postgres 的密码

alter role postgres with password 'postgres'

猜你喜欢

转载自www.cnblogs.com/-xk94/p/10040099.html
今日推荐