[ZBX-19304] Incorrect installation doc Created: 2021 Apr 28  Updated: 2021 May 05  Resolved: 2021 Apr 29

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Documentation (D)
Affects Version/s: 5.2.5
Fix Version/s: None

Type: Documentation task Priority: Trivial
Reporter: Александр Иванович Шабуров Assignee: Zabbix Support Team
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Steps to reproduce.

Добрый день!

В https://www.zabbix.com/ru/download?z...resql&ws=nginx

Вы рекомендуете делать
zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | sudo -u zabbix psql zabbix

У меня выдается ошибка отсутствия psql
Для простой проверки показываю:
root@db-mon-wtc:~

  1. echo "select now();" | sudo -u zabbix psql zabbix
    sudo: psql: command not found

root@db-mon-wtc:~

  1. sudo -u zabbix which psql
    which: no psql in (/sbin:/bin:/usr/sbin:/usr/bin)

root@db-mon-wtc:~

  1. id zabbix
    uid=598(zabbix) gid=598(zabbix) groups=598(zabbix)

Спасибо

Либо нужно заменить пользователя на postgres, либо прописать пользователю zabbix путь к psql



 Comments   
Comment by Александр Иванович Шабуров [ 2021 Apr 29 ]

У меня получилось так

zcat /usr/share/doc/zabbix-server-pgsql*/create.sql.gz | su - postgres -c "cat - | psql zabbix"

Comment by Jurijs Klopovskis [ 2021 Apr 29 ]

Tested on RHEL 8.3

Instructions work fine with both postgresql 10 provided by RedHat as well as with postgresql 13 from upstream repo.

How did you install postgres?

Comment by Александр Иванович Шабуров [ 2021 Apr 29 ]

Я инсталлировал его из исходников. У пользователя postgres есть путь к psql

Как вы делая sudo - zabbix передаете путь к psql?

Comment by Jurijs Klopovskis [ 2021 Apr 29 ]

It seems that in your installation psql client is not in the $PATH globally.

Considering that this is not a problem with Zabbix itself, I'm closing the issue.

Generated at Thu Sep 04 22:20:04 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.