Ad Widget

Collapse

Zabbix 5.0.0 Install from Source with Remote PostgreSQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • levlords
    Junior Member
    • Jun 2020
    • 1

    #1

    Zabbix 5.0.0 Install from Source with Remote PostgreSQL

    Hello!

    I am trying to put together a Proof of Concept environment for Zabbix.
    This environment would built up from 2 CentOS 8 Zabbix Server(in cluster), 2 CentOS 8 PostgreSQL(10) server, and possibly 2 front-end servers.
    I have stuck with the installation. As the servers doesn't have internet access I could use 2 options:
    - Setup a Local repository with all the Zabbix files and dependencies (which I couldn't exactly find)
    - Use the "installation from Source" method.

    I have chosen the 2nd option. The DB server is set up. Let say its name is 'zabbixDB1' in 'company.com' (AD)domain.
    Let's call the Zabbix Server 'zabbixSRV1' in 'comapny.com' domain.

    I have used this guide: https://www.zabbix.com/documentation...lation/install
    and configured the DB based on this: https://www.zabbix.com/documentation...all/db_scripts

    However I am stuck with the
    HTML Code:
    ./configure --enable-server --with-postgresql --with-net-snmp
    command.
    I get back this error message:
    HTML Code:
    checking for pg_config... no
    configure: error: PostgreSQL library not found

    I have these packages installed for PostgreSQL on the 'zabbixSRV1'
    HTML Code:
    postgresql.x86_64 10.6-1.module_el8.0.0+15+f57f353b @InstallMedia-AppStream
    postgresql-contrib.x86_64 10.6-1.module_el8.0.0+15+f57f353b @InstallMedia-AppStream
    postgresql-pltcl.x86_64 10.6-1.module_el8.0.0+15+f57f353b @InstallMedia-AppStream
    postgresql-server.x86_64 10.6-1.module_el8.0.0+15+f57f353b @InstallMedia-AppStream
    postgresql-server-devel.x86_64 10.6-1.module_el8.0.0+15+f57f353b @InstallMedia-AppStream
    I have tried to configure the 'zabbix_server.conf' file under the Zabbix-5.0.0/conf folder with the following:
    HTML Code:
    ### Option: DBHost
    # Database host name.
    # If set to localhost, socket is used for MySQL.
    # If set to empty string, socket is used for PostgreSQL.
    #
    # Mandatory: no
    # Default:
    # DBHost=localhost
    DB-Host=zabbixDB1.company.com
    
    ### Option: DBName
    # Database name.
    #
    # Mandatory: yes
    # Default:
    # DBName=
    
    DBName=zabbix
    
    ### Option: DBSchema
    # Schema name. Used for PostgreSQL.
    #
    # Mandatory: no
    # Default:
    # DBSchema=
    
    ### Option: DBUser
    # Database user.
    #
    # Mandatory: no
    # Default:
    # DBUser=
    
    DBUser=zabbixdb
    
    ### Option: DBPassword
    # Database password.
    # Comment this line if no password is used.
    #
    # Mandatory: no
    # Default:
    # DBPassword=
    DBPassword=SecurePasswordHere
    
    ### Option: DBSocket
    # Path to MySQL socket.
    #
    # Mandatory: no
    # Default:
    # DBSocket=
    
    ### Option: DBPort
    # Database port when not using local socket.
    #
    # Mandatory: no
    # Range: 1024-65535
    # Default:
    # DBPort=
    DBPort=5432
    Can you help what did I miss in this case?
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Unfortunately, Red Hat's naming scheme (that CentOS has inherited) doesn't have everything named with 'postgresql'. The PostgreSQL client library is 'libpq', and the devel package for that is 'libpq-devel'. Make sure you have those installed too. The client library is in its own package for very good reasons, but the mix of naming conventions makes it difficult to figure out what you need.

    If you have cached metadata for packages, the command

    Code:
    sudo yum whatprovides /usr/bin/pg_config
    would have told you what package contains that exact path.


    If I were in your situation, I think I would still try install from packages, though. Just manually download the packages using a browser or curl or wget on a system that does have internet access, and copy them to the systems that need them and install them from packages.

    Also, why PostgreSQL 10? CentOS 8 provides PostgreSQL 12 as well. Wouldn't starting with that now save you a potentially time-consuming DB upgrade in a year or so?

    Comment


    • levlords
      levlords commented
      Editing a comment
      Thank you for your response!

      I have used PostgreSQL10 because that was available on the AppStream of the CentOS8 iso. But you are completely right, I could have downloaded the latest LTS version, and I will do that.

      Can you tell me what packages will I need exactly? I am not that familair with Linux, and I have used https://pkgs.org to serach for packages.

      Also, did I do the neccessary parts for using a Remote DB?

    • tim.mooney
      tim.mooney commented
      Editing a comment
      I don't have an exact list of packages, but the installation guide should provide you with most of what you need. There might be a little trial and error.
Working...