【Linux】安裝 PostgreSQL
阿新 • • 發佈:2018-11-29
參考:
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'