Ad Widget

Collapse

First time installation questions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brhunt
    Member
    • Feb 2013
    • 50

    #1

    First time installation questions

    Hello,

    I would like to install the latest version of Zabbix on a new install of Centos 6.3.

    I see a myriad of scripts and instructions on installation, but most seem to be out of date now.

    Can someone guide my on the best (current) steps for this installation?

    I will be using the full Centos install. What additional services will I need there?
    - MySQL?
    - Perl, PHP, etc?
    - Apache?
    - Anything else?

    It looks as if I can install via YUM using this command:
    yum install zabbix20 <zabbix20-stuff-you-need>

    What should I include for 'zabbix20-stuff-you-need'?

    Any post-install instructions?

    Thanks for all assistance.

    Bryan Hunt
  • volter
    Member
    Zabbix Certified Specialist
    • Dec 2011
    • 85

    #2
    Hello Bryan!

    The following blog article describes how to easily install Zabbix on CentOS:

    EPEL finally offers Zabbix 2.0 packages. These packages are for you, if you are running RHEL, CentOS, Scientific Linux or any other Red Hat derivative. EPEL aims to provide best quality packages, that follow the same rules and conventions as Red Hat packages and therefore integrate smoothly. If you know what EPEL is, keep on […]


    It also gives a list of the sub-packages available. If you want to run the Zabbix server with PostgreSQL, the frontend and an agent, you'd run:

    yum install zabbix20-server-postgresql zabbix20-web-postgresql zabbix20-agent

    Dependency takes care of the rest. Please also notice the README file in the base package: rpm -qd zabbix20

    Apart from that, it's not spectacular: Use the web configuration to set up the frontend, use the SQL dumps (rpm -ql zabbix20-server-*), configure the daemons. That hardly deviates from the procedure described in the Zabbix documentation.

    Comment

    • brhunt
      Member
      • Feb 2013
      • 50

      #3
      Volter,

      Thanks for the reply.

      I assume that I should pre-load Apache and postgresql before running the yum install zabbix20 <zabbix20-stuff-you-need> installation? Those are not loaded by the zabbix install process?

      If so, are there any dependencies for those two installs? A specific version and/or "make sure that you include..."?

      For Apache I have seen:
      yum -y install apache2 php php-curl php-gd php-gmp php-xml php-mbstring

      and
      yum install httpd
      yum install php

      I'm not sure which I should use to make sure that all prerequisites are loaded? Same question for postgresql install?

      Thanks again for the guidance.

      Bryan Hunt

      Comment

      • volter
        Member
        Zabbix Certified Specialist
        • Dec 2011
        • 85

        #4
        Originally posted by brhunt
        Volter,

        Thanks for the reply.

        I assume that I should pre-load Apache and postgresql before running the yum install zabbix20 <zabbix20-stuff-you-need> installation? Those are not loaded by the zabbix install process?
        You have to start those manually, but there's no need to do that ahead of running yum.
        Originally posted by brhunt
        If so, are there any dependencies for those two installs? A specific version and/or "make sure that you include..."?
        Package dependency is taken care of. Starting order is handled within the init scripts. Use chkconfig to set up the daemons to run at start up.

        Originally posted by brhunt
        For Apache I have seen:
        yum -y install apache2 php php-curl php-gd php-gmp php-xml php-mbstring
        Forget that.

        Originally posted by brhunt
        and
        yum install httpd
        yum install php
        And that as well. Dependencies are taken care of.

        Originally posted by brhunt
        I'm not sure which I should use to make sure that all prerequisites are loaded? Same question for postgresql install?

        Thanks again for the guidance.

        Bryan Hunt

        Comment

        • brhunt
          Member
          • Feb 2013
          • 50

          #5
          Volter,

          Okay, chkconfig'd the apache2 server and it is running fine.

          I started down the zabbix setup wizard path.

          I resolved all of the PHP settings issues.

          Now at the point to configure the database connection:
          - I installed postgresql 9.2
          - Using psql under user postgres:
          - I created database zabbix
          - I created user zabbix
          - I installed the three scripts, schema, data, images.
          - I edited the pg_hba.conf file and added a local entry.

          So far, so good. But, when I try to connect via the wizard, it always fails.

          So I thought that I would try a simple psql connection:
          su - postgres
          psql -U zabbix -d zabbix

          It always fails with 'peer authentication failed for user zabbix'.

          psql -U postgres -d zabbix works fine.

          I have tried, literally, about 50 permutations of settings in the pg_hba.conf file, restarting the daemon each time. I can not find any settings that will allow user zabbix to connect.

          Can you assist here?

          Thanks again for your guidance.

          Bryan Hunt

          Comment

          • volter
            Member
            Zabbix Certified Specialist
            • Dec 2011
            • 85

            #6


            It doesn't suprise me, peer authentication doesn't work if you're trying as postgres.

            Comment

            • brhunt
              Member
              • Feb 2013
              • 50

              #7
              Well... it's user 'zabbix' that is failing with the peer and/or trust issue.

              It *is* working for user 'postgres'. I tested using postgres to prove that the database was responding.

              I followed several different guides talking about how to set this up for zabbix, all similar but slightly different. None seem to get passed this problem though.

              Would I have been better off going with MySQL?

              Thanks.

              Bryan Hunt

              Comment

              • brhunt
                Member
                • Feb 2013
                • 50

                #8
                Here are the steps that I followed from the Zabbix wiki:

                Configuring PostgreSQL for use by Zabbix

                Setting up a local user account for zabbix in the database meant adding this line to /var/lib/pgsql/data/pg_hba.conf:

                local zabbix zabbix md5
                Also this psql command to create the user and database – initially you will probably need to do this as the postgres user.

                CREATE USER zabbix WITH PASSWORD 'zzzzzzzzzz';
                CREATE DATABASE zabbix OWNER zabbix;
                Then, as root or any other user, I can create the tables, etc, as described in the zabbix installation guide:

                All done there, so I try:

                [root@zabbix lib]# cd /usr/share/zabbix-postgresql
                [root@zabbix zabbix-postgresql]# cat schema.sql | psql -U zabbix zabbix
                psql: FATAL: Peer authentication failed for user "zabbix"
                [root@zabbix zabbix-postgresql]# cat schema.sql | psql -U zabbix zabbix -W
                Password for user zabbix:
                psql: FATAL: Peer authentication failed for user "zabbix"
                [root@zabbix zabbix-postgresql]#

                I am following the instructions to the letter, so not sure what I am doing incorrectly.

                Thanks again for any help.

                Comment

                • brhunt
                  Member
                  • Feb 2013
                  • 50

                  #9
                  Volter,

                  I have to give up on postgresql, I just couldn't make it work.

                  I installed mysql and it when in like a snap.

                  Thanks for your help on this.

                  Bryan Hunt

                  Comment

                  Working...