-
Notifications
You must be signed in to change notification settings - Fork 31
Description
CentOS 8 ZBX 5.0.1 TSDB 1.7.2 PostgreSQL 12
17058 node2.stg SmEjDiL 113 [Edit] testc8 32 MB 0.96 GB
ssh root@37.205.14.215
Instalace repo
dnf -y update
dnf -y install epel-release
dnf -y install net-tools vim mc wget unzip bash-completion
PostgreSQL
dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
TSDB repo CentOS
curl -s https://packagecloud.io/install/repositories/timescale/timescaledb/script.rpm.sh | bash
Zabbix
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
dnf clean all
Install balicku
PostgreSQL
dnf module disable postgresql
dnf -y install postgresql12-server postgresql12 timescaledb-postgresql-12
Webserver Apache
dnf install httpd
Konfigurace aplikaci
Zabbix server
dnf install zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf zabbix-agent
PostgreSQL
/usr/pgsql-12/bin/postgresql-12-setup initdb
Initializing database ... OK
timescaledb-tune --pg-config=/usr/pgsql-12/bin/pg_config
Using postgresql.conf at this path:
/var/lib/pgsql/12/data/postgresql.conf
Is this correct? [(y)es/(n)o]: y
Writing backup to:
/tmp/timescaledb_tune.backup202007072000
shared_preload_libraries needs to be updated
Current:
#shared_preload_libraries = ''
Recommended:
shared_preload_libraries = 'timescaledb'
Is this okay? [(y)es/(n)o]: y
success: shared_preload_libraries will be updated
Tune memory/parallelism/WAL and other settings? [(y)es/(n)o]: n
Saving changes to: /var/lib/pgsql/12/data/postgresql.conf
cd /var/lib/pgsql/12/data/
diff -u postgresql.conf-orig postgresql.conf
--- postgresql.conf-orig 2020-07-07 20:00:30.796906147 +0000
+++ postgresql.conf 2020-07-07 20:01:18.457343763 +0000
@@ -673,7 +673,7 @@
- Shared Library Preloading -
-#shared_preload_libraries = '' # (change requires restart)
+shared_preload_libraries = 'timescaledb' # (change requires restart)
#local_preload_libraries = ''
#session_preload_libraries = ''
#jit_provider = 'llvmjit' # JIT library to use
@@ -748,3 +748,5 @@
#------------------------------------------------------------------------------
Add settings for extensions here
+timescaledb.last_tuned = '2020-07-07T20:01:18Z'
+timescaledb.last_tuned_version = '0.8.1'
systemctl start postgresql-12
systemctl enable postgresql-12
Zmena konfigurace PostgreSQL
systemctl restart postgresql-12
--- Tady je konecna --- ProstreSQL nelze restartovat !!! Resenim je restartovani VPS (Kontejneru)
systemctl status postgresql-12
● postgresql-12.service - PostgreSQL 12 database server
Loaded: loaded (/usr/lib/systemd/system/postgresql-12.service; enabled; vendor preset: disabled)
Active: deactivating (final-sigkill) since Wed 2020-07-15 08:03:53 UTC; 9min ago
Docs: https://www.postgresql.org/docs/12/static/
Process: 12955 ExecStart=/usr/pgsql-12/bin/postmaster -D ${PGDATA} (code=exited, status=0/SUCCESS)
Process: 12950 ExecStartPre=/usr/pgsql-12/bin/postgresql-12-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
Main PID: 12955 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 3355442)
Memory: 0B
CGroup: /system.slice/postgresql-12.service
čec 15 08:03:49 testc8 postmaster[12955]: 2020-07-15 08:03:49.222 UTC [12955] LOG: starting PostgreSQL 12.3 on x86_6>
čec 15 08:03:49 testc8 postmaster[12955]: 2020-07-15 08:03:49.223 UTC [12955] LOG: listening on IPv6 address "::1", >
čec 15 08:03:49 testc8 postmaster[12955]: 2020-07-15 08:03:49.223 UTC [12955] LOG: listening on IPv4 address "127.0.>
čec 15 08:03:49 testc8 postmaster[12955]: 2020-07-15 08:03:49.223 UTC [12955] LOG: listening on Unix socket "/var/ru>
čec 15 08:03:49 testc8 postmaster[12955]: 2020-07-15 08:03:49.224 UTC [12955] LOG: listening on Unix socket "/tmp/.s>
čec 15 08:03:49 testc8 postmaster[12955]: 2020-07-15 08:03:49.241 UTC [12955] LOG: redirecting log output to logging>
čec 15 08:03:49 testc8 postmaster[12955]: 2020-07-15 08:03:49.241 UTC [12955] HINT: Future log output will appear in>
čec 15 08:03:49 testc8 systemd[1]: Started PostgreSQL 12 database server.
čec 15 08:03:53 testc8 systemd[1]: Stopping PostgreSQL 12 database server...
čec 15 08:03:53 testc8 systemd[1]: postgresql-12.service: Killing process 12956 (postmaster) with signal SIGKILL.
[root@testc8 ~]# systemctl restart postgresql-12