====== Instalação do PostgreSQL no Debian ======
Afim de se obter as versões mais recentes do PostgreSQL deve-se inicialmente adicionar o repositório oficial da comunidade PostgreSQL apt.postgresql.org para a distribuição Debian.
Instalando os pacotes necessário para adicionar o repositório:
root@lab-pgsql:~# apt-get install wget ca-certificates lsb-release
Adicionando o repositório:
root@lab-pgsql:~# bash -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
root@lab-pgsql:~# cat /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main
Obtendo a chave pública do repositório pgdg e instalá-la para continuar sem que seja perguntado a toda hora se os pacotes são válidos:
root@lab-pgsql:~# wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
OK
Atualizando a lista de pacotes:
root@lab-pgsql:~# apt-get update
Listando as versões disponíveis filtrando a versão 9:
root@lab-pgsql:~# apt-cache search postgresql-9
postgresql-9.1-orafce - Oracle support functions for PostgreSQL 9.1
postgresql-9.1-pgfincore - set of PostgreSQL functions to manage blocks in memory
postgresql-9.1-pgmemcache - PostgreSQL interface to memcached
postgresql-9.1-pgpool2 - connection pool server and replication proxy for PostgreSQL - modules
postgresql-9.1-plr - Procedural language interface between PostgreSQL and R
postgresql-9.1-postgis - Geographic objects support for PostgreSQL 9.1
postgresql-client-9.1 - front-end programs for PostgreSQL 9.1
postgresql-contrib-9.1 - additional facilities for PostgreSQL
postgresql-9.1-debversion - Debian version number type for PostgreSQL
postgresql-9.1-pgmp - arbitrary precision integers and rationals for PostgreSQL 9.1
postgresql-9.1-pljava-gcj - Java procedural language for PostgreSQL 9.1
postgresql-9.1-pllua - Lua procedural language for PostgreSQL 9.1
postgresql-9.1-plproxy - database partitioning system for PostgreSQL 9.1
postgresql-9.1-plsh - PL/sh procedural language for PostgreSQL 9.1
postgresql-9.1-prefix - Prefix Range module for PostgreSQL
postgresql-9.0 - object-relational SQL database, version 9.0 server
postgresql-9.0-dbg - debug symbols for postgresql-9.0
postgresql-9.0-debversion - Debian version number type for PostgreSQL
postgresql-9.0-orafce - Oracle support functions for PostgreSQL 9.0
postgresql-9.0-pgfincore - set of PostgreSQL functions to manage blocks in memory
postgresql-9.0-pgmemcache - PostgreSQL interface to memcached
postgresql-9.0-pgmp - arbitrary precision integers and rationals for PostgreSQL 9.0
postgresql-9.0-pgq3 - Skype tools for PostgreSQL replication, londiste and PGQ
postgresql-9.0-pgrouting - basic routing functionality support for PostgreSQL 9.0
postgresql-9.0-pgrouting-doc - basic routing functionality support for PostgreSQL 9.0 (Documentation)
postgresql-9.0-pgstatplans - pg_stat_plans is a variant of the standard Postgres contrib module
postgresql-9.0-pgtap - Unit testing framework extension for PostgreSQL 9.0
postgresql-9.0-pljava-gcj - Java procedural language for PostgreSQL 9.0
postgresql-9.0-pllua - Lua procedural language for PostgreSQL 9.0
postgresql-9.0-plproxy - database partitioning system for PostgreSQL 9.0
postgresql-9.0-plr - Procedural language interface between PostgreSQL and R
postgresql-9.0-plsh - PL/sh procedural language for PostgreSQL 9.0
postgresql-9.0-plv8 - Procedural language interface between PostgreSQL and JavaScript
postgresql-9.0-postgis-2.0 - Geographic objects support for PostgreSQL 9.0
postgresql-9.0-postgis-2.0-scripts - PostGIS 2.0 for PostgreSQL 9.0 -- scripts -- dummy package
postgresql-9.0-postgis-2.1 - Geographic objects support for PostgreSQL 9.0
postgresql-9.0-postgis-2.1-scripts - PostGIS for PostgreSQL 9.0 -- scripts -- dummy package
postgresql-9.0-postgis-scripts - Geographic objects support for PostgreSQL 9.0 -- scripts
postgresql-9.0-prefix - Prefix Range module for PostgreSQL
postgresql-9.0-preprepare - pre prepare your PostgreSQL statements server side
postgresql-9.0-reorg - reorganize tables in PostgreSQL databases without any locks
postgresql-9.0-repmgr - replication manager for PostgreSQL 9.0
postgresql-9.0-repmgr-dbg - debug symbols for repmgr for PostgreSQL 9.0
postgresql-9.0-slony1-2 - replication system for PostgreSQL: PostgreSQL 9.0 server plug-in
postgresql-9.1 - object-relational SQL database, version 9.1 server
postgresql-9.1-asn1oid - ASN.1 OID data type for PostgreSQL
postgresql-9.1-dbg - debug symbols for postgresql-9.1
postgresql-9.1-ip4r - IPv4 and IPv6 types for PostgreSQL 9.1
postgresql-9.1-mimeo - specialized, per-table replication between PostgreSQL instances
postgresql-9.1-pgextwlist - PostgreSQL Extension Whitelisting
postgresql-9.1-pgq3 - Skype tools for PostgreSQL replication, londiste and PGQ
postgresql-9.1-pgrouting - basic routing functionality support for PostgreSQL 9.1
postgresql-9.1-pgrouting-doc - basic routing functionality support for PostgreSQL 9.1 (Documentation)
postgresql-9.1-pgstatplans - pg_stat_plans is a variant of the standard Postgres contrib module
postgresql-9.1-pgtap - Unit testing framework extension for PostgreSQL 9.1
postgresql-9.1-plv8 - Procedural language interface between PostgreSQL and JavaScript
postgresql-9.1-postgis-2.0 - Geographic objects support for PostgreSQL 9.1
postgresql-9.1-postgis-2.0-scripts - PostGIS 2.0 for PostgreSQL 9.1 -- scripts -- dummy package
postgresql-9.1-postgis-2.1 - Geographic objects support for PostgreSQL 9.1
postgresql-9.1-postgis-2.1-scripts - PostGIS for PostgreSQL 9.1 -- scripts -- dummy package
postgresql-9.1-postgis-2.2 - Geographic objects support for PostgreSQL 9.1
postgresql-9.1-postgis-scripts - Geographic objects support for PostgreSQL 9.1 -- scripts
postgresql-9.1-preprepare - pre prepare your PostgreSQL statements server side
postgresql-9.1-prioritize - Get and set the nice priorities of PostgreSQL backends
postgresql-9.1-reorg - reorganize tables in PostgreSQL databases without any locks
postgresql-9.1-repmgr - replication manager for PostgreSQL 9.1
postgresql-9.1-repmgr-dbg - debug symbols for repmgr for PostgreSQL 9.1
postgresql-9.1-slony1-2 - replication system for PostgreSQL: PostgreSQL 9.1 server plug-in
postgresql-9.2 - object-relational SQL database, version 9.2 server
postgresql-9.2-asn1oid - ASN.1 OID data type for PostgreSQL
postgresql-9.2-dbg - debug symbols for postgresql-9.2
postgresql-9.2-debversion - Debian version number type for PostgreSQL
postgresql-9.2-ip4r - IPv4 and IPv6 types for PostgreSQL 9.2
postgresql-9.2-mimeo - specialized, per-table replication between PostgreSQL instances
postgresql-9.2-orafce - Oracle support functions for PostgreSQL 9.2
postgresql-9.2-pgespresso - extension for Barman, Backup and Recovery Manager for PostgreSQL
postgresql-9.2-pgextwlist - PostgreSQL Extension Whitelisting
postgresql-9.2-pgfincore - set of PostgreSQL functions to manage blocks in memory
postgresql-9.2-pgmemcache - PostgreSQL interface to memcached
postgresql-9.2-pgmp - arbitrary precision integers and rationals for PostgreSQL 9.2
postgresql-9.2-pgq3 - Skype tools for PostgreSQL replication, londiste and PGQ
postgresql-9.2-pgrouting - basic routing functionality support for PostgreSQL 9.2
postgresql-9.2-pgrouting-doc - basic routing functionality support for PostgreSQL 9.2 (Documentation)
postgresql-9.2-pgstatplans - pg_stat_plans is a variant of the standard Postgres contrib module
postgresql-9.2-pgtap - Unit testing framework extension for PostgreSQL 9.2
postgresql-9.2-pljava-gcj - Java procedural language for PostgreSQL 9.2
postgresql-9.2-pllua - Lua procedural language for PostgreSQL 9.2
postgresql-9.2-plproxy - database partitioning system for PostgreSQL 9.2
postgresql-9.2-plr - Procedural language interface between PostgreSQL and R
postgresql-9.2-plsh - PL/sh procedural language for PostgreSQL 9.2
postgresql-9.2-plv8 - Procedural language interface between PostgreSQL and JavaScript
postgresql-9.2-postgis-2.0 - Geographic objects support for PostgreSQL 9.2
postgresql-9.2-postgis-2.0-scripts - PostGIS 2.0 for PostgreSQL 9.2 -- scripts -- dummy package
postgresql-9.2-postgis-2.1 - Geographic objects support for PostgreSQL 9.2
postgresql-9.2-postgis-2.1-scripts - PostGIS for PostgreSQL 9.2 -- scripts -- dummy package
postgresql-9.2-postgis-2.2 - Geographic objects support for PostgreSQL 9.2
postgresql-9.2-postgis-scripts - Geographic objects support for PostgreSQL 9.2 -- scripts
postgresql-9.2-prefix - Prefix Range module for PostgreSQL
postgresql-9.2-preprepare - pre prepare your PostgreSQL statements server side
postgresql-9.2-prioritize - Get and set the nice priorities of PostgreSQL backends
postgresql-9.2-reorg - reorganize tables in PostgreSQL databases without any locks
postgresql-9.2-repmgr - replication manager for PostgreSQL 9.2
postgresql-9.2-repmgr-dbg - debug symbols for repmgr for PostgreSQL 9.2
postgresql-9.2-slony1-2 - replication system for PostgreSQL: PostgreSQL 9.2 server plug-in
postgresql-9.3 - object-relational SQL database, version 9.3 server
postgresql-9.3-asn1oid - ASN.1 OID data type for PostgreSQL
postgresql-9.3-dbg - debug symbols for postgresql-9.3
postgresql-9.3-debversion - Debian version number type for PostgreSQL
postgresql-9.3-ip4r - IPv4 and IPv6 types for PostgreSQL 9.3
postgresql-9.3-mimeo - specialized, per-table replication between PostgreSQL instances
postgresql-9.3-mysql-fdw - Postgres 9.3 Foreign Data Wrapper for MySQL
postgresql-9.3-orafce - Oracle support functions for PostgreSQL 9.3
postgresql-9.3-pgespresso - extension for Barman, Backup and Recovery Manager for PostgreSQL
postgresql-9.3-pgextwlist - PostgreSQL Extension Whitelisting
postgresql-9.3-pgfincore - set of PostgreSQL functions to manage blocks in memory
postgresql-9.3-pgmemcache - PostgreSQL interface to memcached
postgresql-9.3-pgmp - arbitrary precision integers and rationals for PostgreSQL 9.3
postgresql-9.3-pgpool2 - connection pool server and replication proxy for PostgreSQL - modules
postgresql-9.3-pgq3 - Skype tools for PostgreSQL replication, londiste and PGQ
postgresql-9.3-pgrouting - basic routing functionality support for PostgreSQL 9.3
postgresql-9.3-pgrouting-doc - basic routing functionality support for PostgreSQL 9.3 (Documentation)
postgresql-9.3-pgtap - Unit testing framework extension for PostgreSQL 9.3
postgresql-9.3-pllua - Lua procedural language for PostgreSQL 9.3
postgresql-9.3-plproxy - database partitioning system for PostgreSQL 9.3
postgresql-9.3-plr - Procedural language interface between PostgreSQL and R
postgresql-9.3-plsh - PL/sh procedural language for PostgreSQL 9.3
postgresql-9.3-plv8 - Procedural language interface between PostgreSQL and JavaScript
postgresql-9.3-postgis-2.1 - Geographic objects support for PostgreSQL 9.3
postgresql-9.3-postgis-2.1-scripts - PostGIS for PostgreSQL 9.3 -- scripts -- dummy package
postgresql-9.3-postgis-2.2 - Geographic objects support for PostgreSQL 9.3
postgresql-9.3-postgis-scripts - Geographic objects support for PostgreSQL 9.3 -- scripts
postgresql-9.3-prefix - Prefix Range module for PostgreSQL
postgresql-9.3-preprepare - pre prepare your PostgreSQL statements server side
postgresql-9.3-prioritize - Get and set the nice priorities of PostgreSQL backends
postgresql-9.3-reorg - reorganize tables in PostgreSQL databases without any locks
postgresql-9.3-repack - reorganize tables in PostgreSQL databases with minimal locks
postgresql-9.3-repmgr - replication manager for PostgreSQL 9.3
postgresql-9.3-repmgr-dbg - debug symbols for repmgr for PostgreSQL 9.3
postgresql-9.3-slony1-2 - replication system for PostgreSQL: PostgreSQL 9.3 server plug-in
postgresql-9.4 - object-relational SQL database, version 9.4 server
postgresql-9.4-asn1oid - ASN.1 OID data type for PostgreSQL
postgresql-9.4-citus - sharding and distributed joins for PostgreSQL
postgresql-9.4-dbg - debug symbols for postgresql-9.4
postgresql-9.4-debversion - Debian version number type for PostgreSQL
postgresql-9.4-ip4r - IPv4 and IPv6 types for PostgreSQL 9.4
postgresql-9.4-mimeo - specialized, per-table replication between PostgreSQL instances
postgresql-9.4-mysql-fdw - Postgres 9.4 Foreign Data Wrapper for MySQL
postgresql-9.4-orafce - Oracle support functions for PostgreSQL 9.4
postgresql-9.4-partman - PostgreSQL Partition Manager
postgresql-9.4-pgespresso - extension for Barman, Backup and Recovery Manager for PostgreSQL
postgresql-9.4-pgextwlist - PostgreSQL Extension Whitelisting
postgresql-9.4-pgfincore - set of PostgreSQL functions to manage blocks in memory
postgresql-9.4-pgmemcache - PostgreSQL interface to memcached
postgresql-9.4-pgmp - arbitrary precision integers and rationals for PostgreSQL 9.4
postgresql-9.4-pgpool2 - connection pool server and replication proxy for PostgreSQL - modules
postgresql-9.4-pgq3 - Skype tools for PostgreSQL replication, londiste and PGQ
postgresql-9.4-pgrouting - basic routing functionality support for PostgreSQL 9.4
postgresql-9.4-pgrouting-doc - basic routing functionality support for PostgreSQL 9.4 (Documentation)
postgresql-9.4-pgtap - Unit testing framework extension for PostgreSQL 9.4
postgresql-9.4-pllua - Lua procedural language for PostgreSQL 9.4
postgresql-9.4-plproxy - database partitioning system for PostgreSQL 9.4
postgresql-9.4-plr - Procedural language interface between PostgreSQL and R
postgresql-9.4-plsh - PL/sh procedural language for PostgreSQL 9.4
postgresql-9.4-plv8 - Procedural language interface between PostgreSQL and JavaScript
postgresql-9.4-postgis-2.1 - Geographic objects support for PostgreSQL 9.4
postgresql-9.4-postgis-2.1-scripts - PostGIS for PostgreSQL 9.4 -- scripts -- dummy package
postgresql-9.4-postgis-2.2 - Geographic objects support for PostgreSQL 9.4
postgresql-9.4-postgis-scripts - Geographic objects support for PostgreSQL 9.4 -- scripts
postgresql-9.4-powa - PostgreSQL Workload Analyzer -- PostgreSQL 9.4 extension
postgresql-9.4-prefix - Prefix Range module for PostgreSQL
postgresql-9.4-preprepare - pre prepare your PostgreSQL statements server side
postgresql-9.4-prioritize - Get and set the nice priorities of PostgreSQL backends
postgresql-9.4-reorg - reorganize tables in PostgreSQL databases without any locks
postgresql-9.4-repack - reorganize tables in PostgreSQL databases with minimal locks
postgresql-9.4-repmgr - replication manager for PostgreSQL 9.4
postgresql-9.4-repmgr-dbg - debug symbols for repmgr for PostgreSQL 9.4
postgresql-9.4-slony1-2 - replication system for PostgreSQL: PostgreSQL 9.4 server plug-in
postgresql-9.5 - object-relational SQL database, version 9.5 server
postgresql-9.5-asn1oid - ASN.1 OID data type for PostgreSQL
postgresql-9.5-citus - sharding and distributed joins for PostgreSQL
postgresql-9.5-dbg - debug symbols for postgresql-9.5
postgresql-9.5-debversion - Debian version number type for PostgreSQL
postgresql-9.5-ip4r - IPv4 and IPv6 types for PostgreSQL 9.5
postgresql-9.5-mimeo - specialized, per-table replication between PostgreSQL instances
postgresql-9.5-mysql-fdw - Postgres 9.5 Foreign Data Wrapper for MySQL
postgresql-9.5-orafce - Oracle support functions for PostgreSQL 9.5
postgresql-9.5-partman - PostgreSQL Partition Manager
postgresql-9.5-pgespresso - extension for Barman, Backup and Recovery Manager for PostgreSQL
postgresql-9.5-pgextwlist - PostgreSQL Extension Whitelisting
postgresql-9.5-pgfincore - set of PostgreSQL functions to manage blocks in memory
postgresql-9.5-pgmemcache - PostgreSQL interface to memcached
postgresql-9.5-pgmp - arbitrary precision integers and rationals for PostgreSQL 9.5
postgresql-9.5-pgpool2 - connection pool server and replication proxy for PostgreSQL - modules
postgresql-9.5-pgq3 - Skype tools for PostgreSQL replication, londiste and PGQ
postgresql-9.5-pgrouting - basic routing functionality support for PostgreSQL 9.5
postgresql-9.5-pgrouting-doc - basic routing functionality support for PostgreSQL 9.5 (Documentation)
postgresql-9.5-pgtap - Unit testing framework extension for PostgreSQL 9.5
postgresql-9.5-plproxy - database partitioning system for PostgreSQL 9.5
postgresql-9.5-plr - Procedural language interface between PostgreSQL and R
postgresql-9.5-plsh - PL/sh procedural language for PostgreSQL 9.5
postgresql-9.5-plv8 - Procedural language interface between PostgreSQL and JavaScript
postgresql-9.5-postgis-2.2 - Geographic objects support for PostgreSQL 9.5
postgresql-9.5-postgis-scripts - Geographic objects support for PostgreSQL 9.5 -- scripts
postgresql-9.5-powa - PostgreSQL Workload Analyzer -- PostgreSQL 9.5 extension
postgresql-9.5-prefix - Prefix Range module for PostgreSQL
postgresql-9.5-preprepare - pre prepare your PostgreSQL statements server side
postgresql-9.5-prioritize - Get and set the nice priorities of PostgreSQL backends
postgresql-9.5-repack - reorganize tables in PostgreSQL databases with minimal locks
postgresql-9.5-repmgr - replication manager for PostgreSQL 9.5
postgresql-9.5-repmgr-dbg - debug symbols for repmgr for PostgreSQL 9.5
postgresql-9.5-slony1-2 - replication system for PostgreSQL: PostgreSQL 9.5 server plug-in
postgresql-client-9.0 - front-end programs for PostgreSQL 9.0
postgresql-client-9.2 - front-end programs for PostgreSQL 9.2
postgresql-client-9.3 - front-end programs for PostgreSQL 9.3
postgresql-client-9.4 - front-end programs for PostgreSQL 9.4
postgresql-client-9.5 - front-end programs for PostgreSQL 9.5
postgresql-contrib-9.0 - additional facilities for PostgreSQL
postgresql-contrib-9.2 - additional facilities for PostgreSQL
postgresql-contrib-9.3 - additional facilities for PostgreSQL
postgresql-contrib-9.4 - additional facilities for PostgreSQL
postgresql-contrib-9.5 - additional facilities for PostgreSQL
Instalando a versão mais recente:
root@lab-pgsql:~# apt-get install postgresql-9.5
Informações do pacote instalado:
root@lab-pgsql:~# dpkg -L postgresql-9.5
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/postgresql-9.5
/usr/share/doc/postgresql-9.5/changelog.Debian.gz
/usr/share/doc/postgresql-9.5/NEWS.Debian.gz
/usr/share/doc/postgresql-9.5/changelog.gz
/usr/share/doc/postgresql-9.5/copyright
/usr/share/postgresql
/usr/share/postgresql/9.5
/usr/share/postgresql/9.5/sql_features.txt
/usr/share/postgresql/9.5/postgres.shdescription
/usr/share/postgresql/9.5/postgres.description
/usr/share/postgresql/9.5/postgres.bki
/usr/share/postgresql/9.5/recovery.conf.sample
/usr/share/postgresql/9.5/postgresql.conf.sample
/usr/share/postgresql/9.5/pg_service.conf.sample
/usr/share/postgresql/9.5/pg_ident.conf.sample
/usr/share/postgresql/9.5/pg_hba.conf.sample
/usr/share/postgresql/9.5/system_views.sql
/usr/share/postgresql/9.5/snowball_create.sql
/usr/share/postgresql/9.5/information_schema.sql
/usr/share/postgresql/9.5/conversion_create.sql
/usr/share/postgresql/9.5/tsearch_data
/usr/share/postgresql/9.5/tsearch_data/synonym_sample.syn
/usr/share/postgresql/9.5/tsearch_data/thesaurus_sample.ths
/usr/share/postgresql/9.5/tsearch_data/hunspell_sample.affix
/usr/share/postgresql/9.5/tsearch_data/ispell_sample.affix
/usr/share/postgresql/9.5/tsearch_data/ispell_sample.dict
/usr/share/postgresql/9.5/tsearch_data/danish.stop
/usr/share/postgresql/9.5/tsearch_data/dutch.stop
/usr/share/postgresql/9.5/tsearch_data/english.stop
/usr/share/postgresql/9.5/tsearch_data/finnish.stop
/usr/share/postgresql/9.5/tsearch_data/french.stop
/usr/share/postgresql/9.5/tsearch_data/german.stop
/usr/share/postgresql/9.5/tsearch_data/hungarian.stop
/usr/share/postgresql/9.5/tsearch_data/italian.stop
/usr/share/postgresql/9.5/tsearch_data/norwegian.stop
/usr/share/postgresql/9.5/tsearch_data/portuguese.stop
/usr/share/postgresql/9.5/tsearch_data/russian.stop
/usr/share/postgresql/9.5/tsearch_data/spanish.stop
/usr/share/postgresql/9.5/tsearch_data/swedish.stop
/usr/share/postgresql/9.5/tsearch_data/turkish.stop
/usr/share/postgresql/9.5/tsearch_data/xsyn_sample.rules
/usr/share/postgresql/9.5/tsearch_data/unaccent.rules
/usr/share/postgresql/9.5/timezonesets
/usr/share/postgresql/9.5/timezonesets/Pacific.txt
/usr/share/postgresql/9.5/timezonesets/Indian.txt
/usr/share/postgresql/9.5/timezonesets/India
/usr/share/postgresql/9.5/timezonesets/Europe.txt
/usr/share/postgresql/9.5/timezonesets/Etc.txt
/usr/share/postgresql/9.5/timezonesets/Default
/usr/share/postgresql/9.5/timezonesets/Australia.txt
/usr/share/postgresql/9.5/timezonesets/Australia
/usr/share/postgresql/9.5/timezonesets/Atlantic.txt
/usr/share/postgresql/9.5/timezonesets/Asia.txt
/usr/share/postgresql/9.5/timezonesets/Antarctica.txt
/usr/share/postgresql/9.5/timezonesets/America.txt
/usr/share/postgresql/9.5/timezonesets/Africa.txt
/usr/share/postgresql/9.5/man
/usr/share/postgresql/9.5/man/man1
/usr/share/postgresql/9.5/man/man1/postmaster.1.gz
/usr/share/postgresql/9.5/man/man1/postgres.1.gz
/usr/share/postgresql/9.5/man/man1/pg_xlogdump.1.gz
/usr/share/postgresql/9.5/man/man1/pg_upgrade.1.gz
/usr/share/postgresql/9.5/man/man1/pg_rewind.1.gz
/usr/share/postgresql/9.5/man/man1/pg_resetxlog.1.gz
/usr/share/postgresql/9.5/man/man1/pg_ctl.1.gz
/usr/share/postgresql/9.5/man/man1/pg_controldata.1.gz
/usr/share/postgresql/9.5/man/man1/initdb.1.gz
/usr/share/postgresql/9.5/extension
/usr/share/postgresql/9.5/extension/plpgsql.control
/usr/share/postgresql/9.5/extension/plpgsql--unpackaged--1.0.sql
/usr/share/postgresql/9.5/extension/plpgsql--1.0.sql
/usr/share/locale
/usr/share/locale/zh_TW
/usr/share/locale/zh_TW/LC_MESSAGES
/usr/share/locale/zh_TW/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/ro
/usr/share/locale/ro/LC_MESSAGES
/usr/share/locale/ro/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/id
/usr/share/locale/id/LC_MESSAGES
/usr/share/locale/id/LC_MESSAGES/postgres-9.5.mo
/usr/share/locale/zh_CN
/usr/share/locale/zh_CN/LC_MESSAGES
/usr/share/locale/zh_CN/LC_MESSAGES/plpython-9.5.mo
/usr/share/locale/zh_CN/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/zh_CN/LC_MESSAGES/postgres-9.5.mo
/usr/share/locale/zh_CN/LC_MESSAGES/pg_rewind-9.5.mo
/usr/share/locale/zh_CN/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/zh_CN/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/zh_CN/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/zh_CN/LC_MESSAGES/initdb-9.5.mo
/usr/share/locale/sv
/usr/share/locale/sv/LC_MESSAGES
/usr/share/locale/sv/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/sv/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/sv/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/sv/LC_MESSAGES/initdb-9.5.mo
/usr/share/locale/ru
/usr/share/locale/ru/LC_MESSAGES
/usr/share/locale/ru/LC_MESSAGES/plpython-9.5.mo
/usr/share/locale/ru/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/ru/LC_MESSAGES/postgres-9.5.mo
/usr/share/locale/ru/LC_MESSAGES/pg_rewind-9.5.mo
/usr/share/locale/ru/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/ru/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/ru/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/ru/LC_MESSAGES/initdb-9.5.mo
/usr/share/locale/pt_BR
/usr/share/locale/pt_BR/LC_MESSAGES
/usr/share/locale/pt_BR/LC_MESSAGES/plpython-9.5.mo
/usr/share/locale/pt_BR/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/pt_BR/LC_MESSAGES/postgres-9.5.mo
/usr/share/locale/pt_BR/LC_MESSAGES/pg_rewind-9.5.mo
/usr/share/locale/pt_BR/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/pt_BR/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/pt_BR/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/pt_BR/LC_MESSAGES/initdb-9.5.mo
/usr/share/locale/pl
/usr/share/locale/pl/LC_MESSAGES
/usr/share/locale/pl/LC_MESSAGES/plpython-9.5.mo
/usr/share/locale/pl/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/pl/LC_MESSAGES/postgres-9.5.mo
/usr/share/locale/pl/LC_MESSAGES/pg_rewind-9.5.mo
/usr/share/locale/pl/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/pl/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/pl/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/pl/LC_MESSAGES/initdb-9.5.mo
/usr/share/locale/ko
/usr/share/locale/ko/LC_MESSAGES
/usr/share/locale/ko/LC_MESSAGES/plpython-9.5.mo
/usr/share/locale/ko/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/ko/LC_MESSAGES/pg_rewind-9.5.mo
/usr/share/locale/ko/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/ko/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/ko/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/ko/LC_MESSAGES/initdb-9.5.mo
/usr/share/locale/ja
/usr/share/locale/ja/LC_MESSAGES
/usr/share/locale/ja/LC_MESSAGES/plpython-9.5.mo
/usr/share/locale/ja/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/ja/LC_MESSAGES/postgres-9.5.mo
/usr/share/locale/ja/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/ja/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/ja/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/ja/LC_MESSAGES/initdb-9.5.mo
/usr/share/locale/it
/usr/share/locale/it/LC_MESSAGES
/usr/share/locale/it/LC_MESSAGES/plpython-9.5.mo
/usr/share/locale/it/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/it/LC_MESSAGES/postgres-9.5.mo
/usr/share/locale/it/LC_MESSAGES/pg_rewind-9.5.mo
/usr/share/locale/it/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/it/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/it/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/it/LC_MESSAGES/initdb-9.5.mo
/usr/share/locale/fr
/usr/share/locale/fr/LC_MESSAGES
/usr/share/locale/fr/LC_MESSAGES/plpython-9.5.mo
/usr/share/locale/fr/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/fr/LC_MESSAGES/postgres-9.5.mo
/usr/share/locale/fr/LC_MESSAGES/pg_rewind-9.5.mo
/usr/share/locale/fr/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/fr/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/fr/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/fr/LC_MESSAGES/initdb-9.5.mo
/usr/share/locale/es
/usr/share/locale/es/LC_MESSAGES
/usr/share/locale/es/LC_MESSAGES/plpython-9.5.mo
/usr/share/locale/es/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/es/LC_MESSAGES/postgres-9.5.mo
/usr/share/locale/es/LC_MESSAGES/pg_rewind-9.5.mo
/usr/share/locale/es/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/es/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/es/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/es/LC_MESSAGES/initdb-9.5.mo
/usr/share/locale/de
/usr/share/locale/de/LC_MESSAGES
/usr/share/locale/de/LC_MESSAGES/plpython-9.5.mo
/usr/share/locale/de/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/de/LC_MESSAGES/postgres-9.5.mo
/usr/share/locale/de/LC_MESSAGES/pg_rewind-9.5.mo
/usr/share/locale/de/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/de/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/de/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/de/LC_MESSAGES/initdb-9.5.mo
/usr/share/locale/cs
/usr/share/locale/cs/LC_MESSAGES
/usr/share/locale/cs/LC_MESSAGES/plpython-9.5.mo
/usr/share/locale/cs/LC_MESSAGES/plpgsql-9.5.mo
/usr/share/locale/cs/LC_MESSAGES/pg_resetxlog-9.5.mo
/usr/share/locale/cs/LC_MESSAGES/pg_ctl-9.5.mo
/usr/share/locale/cs/LC_MESSAGES/pg_controldata-9.5.mo
/usr/share/locale/cs/LC_MESSAGES/initdb-9.5.mo
/usr/lib
/usr/lib/postgresql
/usr/lib/postgresql/9.5
/usr/lib/postgresql/9.5/lib
/usr/lib/postgresql/9.5/lib/ascii_and_mic.so
/usr/lib/postgresql/9.5/lib/cyrillic_and_mic.so
/usr/lib/postgresql/9.5/lib/euc_cn_and_mic.so
/usr/lib/postgresql/9.5/lib/euc_jp_and_sjis.so
/usr/lib/postgresql/9.5/lib/euc_kr_and_mic.so
/usr/lib/postgresql/9.5/lib/euc_tw_and_big5.so
/usr/lib/postgresql/9.5/lib/latin2_and_win1250.so
/usr/lib/postgresql/9.5/lib/latin_and_mic.so
/usr/lib/postgresql/9.5/lib/utf8_and_ascii.so
/usr/lib/postgresql/9.5/lib/utf8_and_big5.so
/usr/lib/postgresql/9.5/lib/utf8_and_cyrillic.so
/usr/lib/postgresql/9.5/lib/utf8_and_euc2004.so
/usr/lib/postgresql/9.5/lib/utf8_and_euc_cn.so
/usr/lib/postgresql/9.5/lib/utf8_and_euc_jp.so
/usr/lib/postgresql/9.5/lib/utf8_and_euc_kr.so
/usr/lib/postgresql/9.5/lib/utf8_and_euc_tw.so
/usr/lib/postgresql/9.5/lib/utf8_and_gb18030.so
/usr/lib/postgresql/9.5/lib/utf8_and_gbk.so
/usr/lib/postgresql/9.5/lib/utf8_and_iso8859.so
/usr/lib/postgresql/9.5/lib/utf8_and_iso8859_1.so
/usr/lib/postgresql/9.5/lib/utf8_and_johab.so
/usr/lib/postgresql/9.5/lib/utf8_and_sjis.so
/usr/lib/postgresql/9.5/lib/utf8_and_sjis2004.so
/usr/lib/postgresql/9.5/lib/utf8_and_uhc.so
/usr/lib/postgresql/9.5/lib/utf8_and_win.so
/usr/lib/postgresql/9.5/lib/euc2004_sjis2004.so
/usr/lib/postgresql/9.5/lib/libpqwalreceiver.so
/usr/lib/postgresql/9.5/lib/plpgsql.so
/usr/lib/postgresql/9.5/lib/dict_snowball.so
/usr/lib/postgresql/9.5/lib/tsearch2.so
/usr/lib/postgresql/9.5/bin
/usr/lib/postgresql/9.5/bin/initdb
/usr/lib/postgresql/9.5/bin/pg_controldata
/usr/lib/postgresql/9.5/bin/pg_ctl
/usr/lib/postgresql/9.5/bin/pg_resetxlog
/usr/lib/postgresql/9.5/bin/pg_rewind
/usr/lib/postgresql/9.5/bin/pg_upgrade
/usr/lib/postgresql/9.5/bin/pg_xlogdump
/usr/lib/postgresql/9.5/bin/postgres
/usr/share/doc/postgresql-9.5/README.Debian.gz
/usr/lib/postgresql/9.5/bin/postmaster
Listando os binários:
root@lab-pgsql:~# ls -l /usr/lib/postgresql/9.5/bin/
total 8524
-rwxr-xr-x 1 root root 50812 Mai 10 13:56 clusterdb
-rwxr-xr-x 1 root root 50844 Mai 10 13:56 createdb
-rwxr-xr-x 1 root root 63044 Mai 10 13:56 createlang
-rwxr-xr-x 1 root root 55132 Mai 10 13:56 createuser
-rwxr-xr-x 1 root root 46668 Mai 10 13:56 dropdb
-rwxr-xr-x 1 root root 63044 Mai 10 13:56 droplang
-rwxr-xr-x 1 root root 46652 Mai 10 13:56 dropuser
-rwxr-xr-x 1 root root 96504 Mai 10 13:56 initdb
-rwxr-xr-x 1 root root 21904 Mai 10 13:56 oid2name
-rwxr-xr-x 1 root root 13712 Mai 10 13:56 pg_archivecleanup
-rwxr-xr-x 1 root root 71516 Mai 10 13:56 pg_basebackup
-rwxr-xr-x 1 root root 75740 Mai 10 13:56 pgbench
-rwxr-xr-x 1 root root 38292 Mai 10 13:56 pg_controldata
-rwxr-xr-x 1 root root 38496 Mai 10 13:56 pg_ctl
-rwxr-xr-x 1 root root 354516 Mai 10 13:56 pg_dump
-rwxr-xr-x 1 root root 75772 Mai 10 13:56 pg_dumpall
-rwxr-xr-x 1 root root 30232 Mai 10 13:56 pg_isready
-rwxr-xr-x 1 root root 50928 Mai 10 13:56 pg_receivexlog
-rwxr-xr-x 1 root root 55104 Mai 10 13:56 pg_recvlogical
-rwxr-xr-x 1 root root 46492 Mai 10 13:56 pg_resetxlog
-rwxr-xr-x 1 root root 136596 Mai 10 13:56 pg_restore
-rwxr-xr-x 1 root root 75344 Mai 10 13:56 pg_rewind
-rwxr-xr-x 1 root root 21916 Mai 10 13:56 pg_standby
-rwxr-xr-x 1 root root 17912 Mai 10 13:56 pg_test_fsync
-rwxr-xr-x 1 root root 13800 Mai 10 13:56 pg_test_timing
-rwxr-xr-x 1 root root 91816 Mai 10 13:56 pg_upgrade
-rwxr-xr-x 1 root root 67200 Mai 10 13:56 pg_xlogdump
-rwxr-xr-x 1 root root 6236056 Mai 10 13:56 postgres
lrwxrwxrwx 1 root root 8 Mai 10 13:55 postmaster -> postgres
-rwxr-xr-x 1 root root 514040 Mai 10 13:56 psql
-rwxr-xr-x 1 root root 54956 Mai 10 13:56 reindexdb
-rwxr-xr-x 1 root root 55004 Mai 10 13:56 vacuumdb
-rwxr-xr-x 1 root root 21904 Mai 10 13:56 vacuumlo
Arquivos de configuração:
root@lab-pgsql:~# ls -l /etc/postgresql/9.5/main/
total 48
-rw-r--r-- 1 postgres postgres 315 Jun 3 11:26 environment
-rw-r--r-- 1 postgres postgres 143 Jun 3 11:26 pg_ctl.conf
-rw-r----- 1 postgres postgres 4641 Jun 3 11:26 pg_hba.conf
-rw-r----- 1 postgres postgres 1636 Jun 3 11:26 pg_ident.conf
-rw-r--r-- 1 postgres postgres 21916 Jun 3 11:26 postgresql.conf
-rw-r--r-- 1 postgres postgres 378 Jun 3 11:26 start.conf
Diretório do cluster:
root@lab-pgsql:~# ls -l /var/lib/postgresql/9.5/main/
total 84
drwx------ 5 postgres postgres 4096 Jun 3 11:26 base
drwx------ 2 postgres postgres 4096 Jun 3 11:26 global
drwx------ 2 postgres postgres 4096 Jun 3 11:26 pg_clog
drwx------ 2 postgres postgres 4096 Jun 3 11:25 pg_commit_ts
drwx------ 2 postgres postgres 4096 Jun 3 11:25 pg_dynshmem
drwx------ 4 postgres postgres 4096 Jun 3 11:25 pg_logical
drwx------ 4 postgres postgres 4096 Jun 3 11:25 pg_multixact
drwx------ 2 postgres postgres 4096 Jun 3 11:26 pg_notify
drwx------ 2 postgres postgres 4096 Jun 3 11:25 pg_replslot
drwx------ 2 postgres postgres 4096 Jun 3 11:25 pg_serial
drwx------ 2 postgres postgres 4096 Jun 3 11:25 pg_snapshots
drwx------ 2 postgres postgres 4096 Jun 3 11:25 pg_stat
drwx------ 2 postgres postgres 4096 Jun 3 11:25 pg_stat_tmp
drwx------ 2 postgres postgres 4096 Jun 3 11:26 pg_subtrans
drwx------ 2 postgres postgres 4096 Jun 3 11:25 pg_tblspc
drwx------ 2 postgres postgres 4096 Jun 3 11:25 pg_twophase
-rw------- 1 postgres postgres 4 Jun 3 11:25 PG_VERSION
drwx------ 3 postgres postgres 4096 Jun 3 11:26 pg_xlog
-rw------- 1 postgres postgres 88 Jun 3 11:26 postgresql.auto.conf
-rw------- 1 postgres postgres 133 Jun 3 11:26 postmaster.opts
-rw------- 1 postgres postgres 100 Jun 3 11:26 postmaster.pid
Conectando ao banco de dados como usuário postgres:
root@lab-pgsql:~# su - postgres
postgres@lab-pgsql:~$ psql
psql (9.5.3)
Digite "help" para ajuda.
postgres=# \q
postgres@lab-pgsql:~$ exit
logout
Processos abertos pelo PostgreSQL:
root@lab-pgsql:~# ps aux | grep postgres
postgres 8300 0.0 5.3 160916 13480 ? S 11:26 0:00 /usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5/main -c config_file=/etc/postgresql/9.5/main/postgresql.conf
postgres 8302 0.0 0.5 160916 1432 ? Ss 11:26 0:00 postgres: checkpointer process
postgres 8303 0.0 0.7 160916 1984 ? Ss 11:26 0:00 postgres: writer process
postgres 8304 0.0 0.4 160916 1208 ? Ss 11:26 0:00 postgres: wal writer process
postgres 8305 0.0 0.8 161188 2248 ? Ss 11:26 0:00 postgres: autovacuum launcher process
postgres 8306 0.0 0.5 18132 1292 ? Ss 11:26 0:00 postgres: stats collector process
root 8655 0.0 0.2 3584 744 pts/0 S+ 12:08 0:00 grep postgres
Verificando as conexões:
root@lab-pgsql:~# ss -nltp | grep postgres
LISTEN 0 128 127.0.0.1:5432 *:* users:(("postgres",8300,7))
LISTEN 0 128 ::1:5432 :::* users:(("postgres",8300,4))