yum安装postgresql

前端之家收集整理的这篇文章主要介绍了yum安装postgresql前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、Install the repository RPM:@H_404_3@

yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm@H_404_3@

2、Install the client packages:@H_404_3@

yum install postgresql95
@H_404_3@

3、Optionally install the server packages:@H_404_3@

yum install postgresql95-server@H_404_3@

4、Optionally initialize the database and enable automatic start:@H_404_3@

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

5、Test:@H_404_3@

su - postgres@H_404_3@

$ psql@H_404_3@

$\l@H_404_3@

CREATE DATABASE myDb;
@H_404_3@

CREATE USER mytest CREATEDB LOGIN PASSWORD 'mytest';
@H_404_3@

GRANT ALL ON DATABASE myDb TO mytest; @H_404_3@ 原文链接:https://www.f2er.com/bash/389491.html

猜你在找的Bash相关文章