Ad Widget

Collapse

New install Zabbix4.4 PostgreSQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chayanisa
    Junior Member
    • Feb 2020
    • 5

    #1

    New install Zabbix4.4 PostgreSQL

    Hi guys,

    I am installing Zabbix 4.4 on Centos 7 PostgreSQL Nginx. rpm -Uvh https://repo.zabbix.com/zabbix/4.4/r...el7.noarch.rpm

    at the create initial database, i could not create postgres user,
    as the error showed.

    [chayanisa@localhost]$ sudo -u postgres createuser --pwprompt zabbix
    sudo: unknown user: postgres
    sudo: unable to initialize policy plugin
    How can i fix this?
    thanks!

  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    How did you install PostgreSQL server?
    If it is a CentOS 7 standard package, it is a package called postgresql-server.

    Comment


    • chayanisa
      chayanisa commented
      Editing a comment
      Hi Atsushi, thanks for your answer,
      I have CentOS 7.7.1908 (core) on VM Box.
      I did follow the instruction https://www.zabbix.com/download?zabb...resql&ws=nginx

      # yum -y install zabbix-server-pgsql zabbix-web-pgsql zabbix-nginx-conf zabbix-agent.


      after this command i have seen that the package postgresql-server is already installted.

      Package zabbix-server-pgsql-4.4.5-2.el7.x86_64 already installed and latest version
      Package zabbix-web-pgsql-4.4.5-2.el7.noarch already installed and latest version
      Package zabbix-nginx-conf-4.4.5-2.el7.noarch already installed and latest version
      Package zabbix-agent-4.4.5-2.el7.x86_64 already installed and latest version
      Nothing to do

    • Atsushi
      Atsushi commented
      Editing a comment
      Is the PostgreSQL server package installed, not the Zabbix server package for PostgreSQL?
      If you use CentOS 7 standard package, dimir also wrote, but please execute the following command and use the package of PostgreSQL server.

      # yum install postgresql-server
      Last edited by Atsushi; 03-02-2020, 12:52.
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #3
    You need to have PostgreSQL server installed somewhere so that Zabbix server could connect to it. This is unclear indeed from the instructions. The PostgreSQL server can be installed on the same host as well as on another host. So before running
    Code:
    sudo -u postgres createuser --pwprompt zabbix
    you need to either connect to the host where PostgreSQL server is installed or install it locally using
    Code:
    yum install postgresql-server

    Comment

    • chayanisa
      Junior Member
      • Feb 2020
      • 5

      #4
      Originally posted by dimir
      You need to have PostgreSQL server installed somewhere so that Zabbix server could connect to it. This is unclear indeed from the instructions. The PostgreSQL server can be installed on the same host as well as on another host. So before running
      Code:
      sudo -u postgres createuser --pwprompt zabbix
      you need to either connect to the host where PostgreSQL server is installed or install it locally using
      Code:
      yum install postgresql-server
      thanks Dimir for your answer,
      I did installed PostgreSQL server and got some errors when i tried to connect to zabbix aswell.
      However i m almost done, but


      1. I could not see my log files.

      Code:
      [chaya@localhost ~]$ less /var/log/zabbix/zabbix_server.log
      /var/log/zabbix/zabbix_server.log: No such file or directory
      2. I have done uncomment time zone /etc/httpd/conf.d/zabbix.conf
      Code:
         php_value date.timezone Europe/Riga
      but on my web brower still got an error.

      Time zone for PHP is not set (configuration parameter "date.timezone").

      Im fixing it now,

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #5
        Did you perform the following steps:
        Code:
        systemctl restart zabbix-server zabbix-agent httpd
        systemctl enable zabbix-server zabbix-agent httpd
        ?

        Comment

        • chayanisa
          Junior Member
          • Feb 2020
          • 5

          #6
          Originally posted by dimir
          Did you perform the following steps:
          Code:
          systemctl restart zabbix-server zabbix-agent httpd
          systemctl enable zabbix-server zabbix-agent httpd
          ?
          Yes, I have following all the steps.
          First i got Nginx error , which is i did not change anything.
          and now after restart the machine, I am able to start Web page.
          However i got another error
          Cannot connect to database.
          I do all systemctl restart all services.
          also database password has set. /etc/zabbix/zabbix_server.conf

          and have check ProstgreSQL . Anyway i still could not fix the problem.


          postgres-# \c zabbix
          You are now connected to database "zabbix" as user "postgres".
          zabbix-# \dt
          public | acknowledges | table | zabbix
          public | actions | table | zabbix
          public | alerts | table | zabbix
          public | application_discovery | table | zabbix
          public | application_prototype | table | zabbix
          public | application_template | table | zabbix

          Comment

          Working...