加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

yum安装postgresql

发布时间:2020-12-15 09:13:22 所属栏目:安全 来源:网络整理
导读:1、 Install the repository RPM: yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm 2、 Install the client packages: yum install postgresql95 3、 Optionally install the server

1、Install the repository RPM:

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

2、Install the client packages:

yum install postgresql95

3、Optionally install the server packages:

yum install postgresql95-server

4、Optionally initialize the database and enable automatic start:

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

5、Test:

su - postgres

$ psql

$l

CREATE DATABASE myDb;

CREATE USER mytest CREATEDB LOGIN PASSWORD 'mytest';

GRANT ALL ON DATABASE myDb TO mytest;

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读