Centos7下安装postgresql

1、yum  install    postgresql

2、yum  install    postgresql-contrib

3、yum  install    postgresql-server

4、yum  install    postgresql-devel

5/usr/bin/postgresql-setup     initdb

6systemctl enable postgresql

7systemctl start postgresql

PostgreSQL 安装完成后,会建立一下‘postgres’用户,用于执行PostgreSQL,数据库中也会建立一个’postgres’用户,默认密码为自动生成,需要在系统中改一下。

8passwd postgress

9su - postgres

10psql -U postgres
11ALTER USER postgres WITH PASSWORD ‘abc123’

12systemctl restart postgresql.service




猜你喜欢

转载自blog.csdn.net/langeldep/article/details/80716356