Fresh install
Closed this issue ยท 3 comments
amar3lo commented
how should i proceed on a fresh installation? which step should I import the create.sql?
Doctorbal commented
Excellent question @amar3lo!
I realized I did not mention that in the guide as this was mainly addressed to migrating to a partitioned database from an already running Zabbix instance.
To use partitioning on a fresh install on the following specifications:
- Zabbix version 4.0
- Debain 9 OS Distro
- PostgreSQL v.11
- Install PostgreSQL v11.
- Prepare Zabbix Database.
- Create Empty history* and trends* Tables, install pg_partman, ensure make the necessary changes in the postgresql.conf file, create the partitioned tables. Alternatively you can use my ansible role to install pg_partman which performs the previous blocks. Ensure you read the comments in the
defaults/main.yml
file. - Then import the Zabbix 4.0 schema by performing the following:
$ cd /tmp
$ wget https://repo.zabbix.com/zabbix/4.0/debian/pool/main/z/zabbix-release/zabbix-release_4.0-3+stretch_all.deb
$ sudo dpkg -i zabbix-release_4.0-3+stretch_all.deb
$ sudo apt update
$ sudo apt-get install --no-install-recommends zabbix-server-pgsql
# Now import the schema. You will get errors stating some tables and indexes already exist but ignore those as they were purposefully set on the partitioning portion.
$ zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | sudo -u zabbix psql zabbix
- Continue with the rest of the installation.
Let me know how it goes and if you run into any issues.
All the best,
Andreas
amar3lo commented
I have no words to express my gratitude!!! it works like a charm, thank you!