标签:postgresql
sudo yum install postgresql-server postgresql
sudo su - postgres
initdb -D /var/lib/pgsql/data
systemctl status postgresql.service
systemctl start postgresql.service
systemctl stop postgresql.service
修改 /var/lib/pgsql/data/postgresql.conf 文件
listen_addresses =‘*‘
修改 /var/lib/pgsql/data/pg_hba.conf 文件**
host all all 0.0.0.0/0 trust
systemctl restart postgresql.service
$ sudo su - postgres
$ psql -U postgres -W
$ Password for user postgres: postgres
postgres=# CREATE USER <user> WITH PASSWORD ‘<password>‘;
postgres=# CREATE DATABASE test OWNER <user> ENCODING ‘UTF8‘;
$ psql -U kongxx -d test
test=> \dt
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:postgresql
原文地址:http://blog.csdn.net/kongxx/article/details/48502887