您的位置:首页 > 博客中心 > 数据库 >

【Linux】安装 PostgreSQL

时间:2022-03-15 12:03

参考:

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

1、进入 ,

 

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

技术分享图片

 

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

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

      :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‘

 

热门排行

今日推荐

热门手游