centos7下postgresql9.5安裝

環境:CentOS Linux release 7.4.1708 (Core)

postgresql版本:9.5

官網地址:https://www.postgresql.org/download/linux/redhat/

1.安裝

yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

yum install -y postgresql95-server

/usr/pgsql-9.5/bin/postgresql95-setup initdb
systemctl enable postgresql-9.5
systemctl start postgresql-9.5

2.使用

su - postgres
-bash-4.2$ psql
postgres=# select version();
\l
\q

 

su - postgres
psql -U postgres
alter user postgres with password '123456'

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章