postgresql 11 GA版本于2018.10.18 正式发布
# yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-redhat11-11-2.noarch.rpm -y
# yum -y install postgresql11 postgresql11-server postgresql11-libs
说明:
postgresql-client libraries and client binaries
postgresql-server core database server
postgresql-contrib additional supplied modules
postgresql-devel libraries and headers for C language development
--初始化数据库:
# /usr/pgsql-11/bin/postgresql-11-setup initdb
Initializing database ... OK
# systemctl enable postgresql-11
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql-11.service to /usr/lib/systemd/system/postgresql-11.service.
# systemctl start postgresql-11
--登录数据库:
--切换账号:
# su - postgres
$ psql
psql (9.2.24, server 11.0)
WARNING: psql version 9.2, server version 11.0.
Some psql features might not work.
Type "help" for help.
postgres=# create database hr;
CREATE DATABASE