- 安装postgresql
- 配置postgresql
[root@linux3 ~]# postgresql-setup --initdb //初始化数据库
- Initializing database in ‘/var/lib/pgsql/data’
- Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log
[root@linux3 ~]# systemctl enable postgresql.service
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /usr/lib/systemd/system/postgresql.service.
[root@linux3 ~]# systemctl start postgresql.service
3.创建数据库
cd /usr/bin/
[root@linux3 bin]# psql -U postgres
psql: FATAL: Peer authentication failed for user “postgres”
[root&