install_postgres_ol8
Differences
This shows you the differences between two versions of the page.
| install_postgres_ol8 [2025/07/26 17:09] – - Imported by DokuWiki Advanced Plugin wikiadm | install_postgres_ol8 [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Instalação no Oracle Linux 8 ====== | ||
| - | ===== Preparando o sistema operacional ===== | ||
| - | [[initial_config_centos8|Configuração inicial - CentOS 8/ | ||
| - | ===== Desativando o módulo padrão ===== | ||
| - | |||
| - | <file bash> | ||
| - | $ dnf module list postgresql | ||
| - | Última verificação de data de vencimento de metadados: 0:00:27 atrás em qua 15 jun 2022 14:35:53 -03. | ||
| - | Oracle Linux 8 Application Stream (x86_64) | ||
| - | Name Stream | ||
| - | postgresql | ||
| - | postgresql | ||
| - | postgresql | ||
| - | postgresql | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo dnf -qy module disable postgresql | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ dnf module list postgresql | ||
| - | Última verificação de data de vencimento de metadados: 0:05:44 atrás em qua 15 jun 2022 14:35:53 -03. | ||
| - | Oracle Linux 8 Application Stream (x86_64) | ||
| - | Name | ||
| - | postgresql | ||
| - | postgresql | ||
| - | postgresql | ||
| - | postgresql | ||
| - | |||
| - | Sugestão: [d] padrão, [e] habilitado, [x] desabilitado, | ||
| - | </ | ||
| - | |||
| - | ===== Adicionando o repositório oficial ===== | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo dnf install https:// | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ dnf search postgresql14 | ||
| - | Última verificação de data de vencimento de metadados: 0:00:12 atrás em qua 15 jun 2022 14:49:05 -03. | ||
| - | ================================================================================== Nome Correspondeu Exatamente: postgresql14 =================================================================================== | ||
| - | postgresql14.x86_64 : PostgreSQL client programs and libraries | ||
| - | ======================================================================================== Nome Correspondeu: | ||
| - | postgresql14-contrib.x86_64 : Contributed source and binaries distributed with PostgreSQL | ||
| - | postgresql14-devel.x86_64 : PostgreSQL development header files and libraries | ||
| - | postgresql14-docs.x86_64 : Extra documentation for PostgreSQL | ||
| - | postgresql14-libs.x86_64 : The shared libraries required for any PostgreSQL clients | ||
| - | postgresql14-llvmjit.x86_64 : Just-in-time compilation support for PostgreSQL | ||
| - | postgresql14-odbc.x86_64 : PostgreSQL ODBC driver | ||
| - | postgresql14-plperl.x86_64 : The Perl procedural language for PostgreSQL | ||
| - | postgresql14-plpython3.x86_64 : The Python3 procedural language for PostgreSQL | ||
| - | postgresql14-pltcl.x86_64 : The Tcl procedural language for PostgreSQL | ||
| - | postgresql14-server.x86_64 : The programs needed to create and run a PostgreSQL server | ||
| - | postgresql14-tcl.x86_64 : A Tcl client library for PostgreSQL | ||
| - | postgresql14-test.x86_64 : The test suite distributed with PostgreSQL | ||
| - | </ | ||
| - | |||
| - | ===== Instalando o PostgreSQL ===== | ||
| - | <file bash> | ||
| - | $ sudo dnf install postgresql14-server postgresql14-contrib | ||
| - | </ | ||
| - | |||
| - | ===== Inicializando o database e o serviço do PostgreSQL ===== | ||
| - | <file bash> | ||
| - | $ sudo postgresql-14-setup initdb | ||
| - | Initializing database ... OK | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo systemctl enable --now postgresql-14 | ||
| - | Created symlink / | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ systemctl is-enabled postgresql-14 | ||
| - | enabled | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ systemctl status postgresql-14 | ||
| - | ● postgresql-14.service - PostgreSQL 14 database server | ||
| - | | ||
| - | | ||
| - | Docs: https:// | ||
| - | Process: 3286 ExecStartPre=/ | ||
| - | Main PID: 3292 (postmaster) | ||
| - | Tasks: 8 (limit: 23627) | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| - | jun 15 14:55:31 pgsql systemd[1]: Starting PostgreSQL 14 database server... | ||
| - | jun 15 14:55:31 pgsql postmaster[3292]: | ||
| - | jun 15 14:55:31 pgsql postmaster[3292]: | ||
| - | jun 15 14:55:32 pgsql systemd[1]: Started PostgreSQL 14 database server. | ||
| - | </ | ||
| - | |||
| - | ===== Instalando a extensão TimescaleDB ===== | ||
| - | <file bash> | ||
| - | $ sudo tee / | ||
| - | [timescale_timescaledb] | ||
| - | name=timescale_timescaledb | ||
| - | baseurl=https:// | ||
| - | repo_gpgcheck=1 | ||
| - | gpgcheck=0 | ||
| - | enabled=1 | ||
| - | gpgkey=https:// | ||
| - | sslverify=1 | ||
| - | sslcacert=/ | ||
| - | metadata_expire=300 | ||
| - | EOL | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo dnf install timescaledb-2-postgresql-14 | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo timescaledb-tune --pg-config=/ | ||
| - | Using postgresql.conf at this path: | ||
| - | / | ||
| - | |||
| - | Is this correct? [(y)es/ | ||
| - | Writing backup to: | ||
| - | / | ||
| - | |||
| - | shared_preload_libraries needs to be updated | ||
| - | Current: | ||
| - | # | ||
| - | Recommended: | ||
| - | shared_preload_libraries = ' | ||
| - | Is this okay? [(y)es/ | ||
| - | success: shared_preload_libraries will be updated | ||
| - | |||
| - | Tune memory/ | ||
| - | Recommendations based on 7.58 GB of available memory and 8 CPUs for PostgreSQL 14 | ||
| - | |||
| - | Memory settings recommendations | ||
| - | Current: | ||
| - | shared_buffers = 128MB | ||
| - | # | ||
| - | # | ||
| - | #work_mem = 4MB | ||
| - | Recommended: | ||
| - | shared_buffers = 1940MB | ||
| - | effective_cache_size = 5821MB | ||
| - | maintenance_work_mem = 993601kB | ||
| - | work_mem = 2484kB | ||
| - | Is this okay? [(y)es/ | ||
| - | success: memory settings will be updated | ||
| - | |||
| - | Parallelism settings recommendations | ||
| - | Current: | ||
| - | missing: timescaledb.max_background_workers | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | Recommended: | ||
| - | timescaledb.max_background_workers = 8 | ||
| - | max_worker_processes = 19 | ||
| - | max_parallel_workers_per_gather = 4 | ||
| - | max_parallel_workers = 8 | ||
| - | Is this okay? [(y)es/ | ||
| - | success: parallelism settings will be updated | ||
| - | |||
| - | WAL settings recommendations | ||
| - | Current: | ||
| - | # | ||
| - | min_wal_size = 80MB | ||
| - | Recommended: | ||
| - | wal_buffers = 16MB | ||
| - | min_wal_size = 512MB | ||
| - | Is this okay? [(y)es/ | ||
| - | success: WAL settings will be updated | ||
| - | |||
| - | Miscellaneous settings recommendations | ||
| - | Current: | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | Recommended: | ||
| - | default_statistics_target = 500 | ||
| - | random_page_cost = 1.1 | ||
| - | checkpoint_completion_target = 0.9 | ||
| - | max_locks_per_transaction = 64 | ||
| - | autovacuum_max_workers = 10 | ||
| - | autovacuum_naptime = 10 | ||
| - | effective_io_concurrency = 256 | ||
| - | Is this okay? [(y)es/ | ||
| - | success: miscellaneous settings will be updated | ||
| - | Saving changes to: / | ||
| - | </ | ||
| - | |||
| - | <file bash> | ||
| - | $ sudo systemctl restart postgresql-14 | ||
| - | </ | ||
| - | ===== Referências ===== | ||
| - | - [[https:// | ||
| - | - [[https:// | ||
| - | - [[https:// | ||
install_postgres_ol8.1753560544.txt.gz · Last modified: by wikiadm
