Ad Widget

Collapse

MySQL setup - Pre ./config ???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zombiehunter
    Member
    • Jun 2007
    • 31

    #1

    MySQL setup - Pre ./config ???

    Hello all-
    I'm having some significant trouble getting Zabbix 1.4 setup and i'm not sure what to do next. I'm following the 1.4 (007) manual and running through the pre-install part:

    adding zabbix as user. did this (from http://www.howtoforge.com/zabbix_network_monitoring )
    It is an older version but im new and thought the initial bits were prob the same. Didn't give zabbix a password. Is that right?


    1 - Make the zabbix user and group

    groupadd zabbix
    useradd -c 'Zabbix' -d /home/zabbix -g zabbix -s /bin/bash zabbix
    mkdir /home/zabbix
    chown -R zabbix.zabbix /home/zabbix


    2 - Untar the sources

    cd /home/zabbix
    tar zxvpf zabbix-1.1beta8.tar.gz
    mv zabbix-1.1beta7 zabbix
    cd zabbix
    chown -R zabbix.zabbix .
    su - zabbix




    and then i'm at the part on page 37 where it's setting up the MySQL db.

    [I]For MySQL:
    shell> mysql -u<username> -p<password>
    mysql> create database zabbix;
    mysql> quit;
    shell> cd create/mysql
    shell> cat schema.sql |mysql -u<username> -p<password> zabbix
    shell> cd ../data
    shell> cat data.sql |mysql -u<username> -p<password> zabbix
    shell> cat images_mysql.sql |mysql -u<username> -p<password> zabbix

    I created the db but problem is I keep getting this then when I try to
    cd create/mysql
    No such file or directory. I heard from someone on this forum that the paths for MySQL were messed up in config or something. It seems that it's configuring the schema so I
    cd create
    cd schema


    can't find schema.sql as per the manual, but I do find mysql.sql which looks like a configuration file (or something controlling the schema for mysql) so I try
    cat mysql.sql |mysql -u zabbix zabbix (as I have not set a zabbix user pw)

    and get

    "ERROR 1045 (28000): Access is denied for user 'zabbix'@'localhost' (using password:NO)


    What's the problem? I need to set a password for zabbix user? I can do that but then i'm wondering where in zabbix and/or mysql config files do I need to enter that password for it to authenticate?




    I'm running debian etch and my path for zabbix install is /home/zabbix if it helps.
  • Niels
    Senior Member
    • May 2007
    • 239

    #2
    You made a password when you created the user. You say you "have not set a zabbix user pw", but I don't see how that's possible. Probably you set the password to <blank>. Just use the -p option, and press <enter> when it asks you for your password.

    Comment

    • treyh
      Member
      • May 2007
      • 64

      #3
      zabbix

      Try this:

      this these paths:

      [I]For MySQL:
      shell> mysql -u<username> -p<password>
      mysql> create database zabbix;
      mysql> quit;
      shell> cd create/schema
      shell> cat schema.sql |mysql -u<username> -p<password> zabbix
      shell> cd ../data
      shell> cat data.sql |mysql -u<username> -p<password> zabbix
      shell> cat images_mysql.sql |mysql -u<username> -p<password> zabbix

      the documentation needs to be updated /create/mysql does not exist on the 1.4 source download

      Comment

      • zombiehunter
        Member
        • Jun 2007
        • 31

        #4
        that worked sortof

        following both (I think) of your advice, I did:

        cd create/schema
        cat mysql.sql |mysql zabbix (there was no schema.sql)
        cd ..
        cd data
        cat data.sql |mysql zabbix
        cat images_mysql.sql |mysql zabbix

        (no responses or echo so I thought perhaps that was ok)
        had to cd ..
        cd ..
        to do this:

        netprobe:/home/zabbix# ./configure --enable-server --with-mysql --with-net-snmp --with-jabber


        yadayadayada....
        checking for mysql_config... no
        configure: error: Not found MySQL library


        and got the MySQL library not found. What am I missing?
        (thanks so much for the help you guys- I appreciate it)

        Comment

        • Niels
          Senior Member
          • May 2007
          • 239

          #5
          Originally posted by zombiehunter
          and got the MySQL library not found. What am I missing?
          You're missing the MySQL library
          Depending on your distribution you need to install something like "mysql-dev" or "libmysqldev".

          Comment

          • zombiehunter
            Member
            • Jun 2007
            • 31

            #6
            you're right

            i still needed-
            libmysql-dev

            did./configure yada yada again and got
            checking for pkg-config... no
            checking for IKSEMEL... configure: error: Not found Jabber library

            I know I installed the 3 below and then verified just to be sure

            libiksemel3 libiksemel-utils libiksemel-dev
            are installed though.
            any ideas? I tried installing the jabber package itself to no avail.

            Comment

            • Niels
              Senior Member
              • May 2007
              • 239

              #7
              I've also had problems with iksemel, there's a thread from me about it. I don't think the issue got resolved, and so now I'm configuring without Jabber. You should try that too, to get things going. If you really need Jabber support later, deal with the problem then.

              Comment

              • zombiehunter
                Member
                • Jun 2007
                • 31

                #8
                ./configure finally worked

                ./configure –enable-static –enable-server –enable-agent –with-mysql –with-net-snmp –with-libcurl

                Make install

                Tried that and got recursive errors.
                Tried w/o agent and same
                Tried w/o static too and it worked
                Used make distclean between
                So this worked-
                ./configure –enable-server –with-mysql –with-net-snmp –with-libcurl

                (I wantd to be able to distribute the compiled server binary to other servers but...)

                but w/o the extras it did finally make install. But then when
                cd /usr/local/bin
                ./zabbix_server

                got this error now. Huh?

                ./zabbix_server: error while loading shared libraries: libnetsnmp.so.15: cannot open shared object file: No such file or directory.

                ugh. I thought I had net-snmp compiled and installed correctly. Perhaps it's just not configured properly?

                Comment

                • zombiehunter
                  Member
                  • Jun 2007
                  • 31

                  #9
                  oh yeah

                  i did a slocate and I do have the library.

                  netprobe:/usr/local/bin# slocate libnetsnmp.so.15
                  /usr/local/lib/libnetsnmp.so.15.0.0
                  /usr/local/lib/libnetsnmp.so.15
                  /root/downloads/net-snmp-5.4/snmplib/.libs/libnetsnmp.so.15.0.0
                  /root/downloads/net-snmp-5.4/snmplib/.libs/libnetsnmp.so.15

                  I guess I need to edit either net-snmp-config or zabbix_server.config? but which part and what to add?
                  Last edited by zombiehunter; 07-06-2007, 17:52. Reason: forget something

                  Comment

                  • treyh
                    Member
                    • May 2007
                    • 64

                    #10
                    library

                    Hey,

                    Try copying /usr/local/lib/libnetsnmp.so.15 to /usr/lib/libnetsnmp.so.15

                    Comment

                    • zombiehunter
                      Member
                      • Jun 2007
                      • 31

                      #11
                      lol

                      thanks- I did copy it to that loc, and now I get ./zabbix_server [9657]: Cannot open config file [/etc/zabbix/zabbix_server.conf] [no such file or directory]

                      I tried copying it from
                      /home/zabbix/misc/conf/zabbix_server.conf
                      to
                      /etc/zabbix/zabbix_server.conf

                      but there IS NO ZABBIX folder there! LOL what on earth am I doing wrong? I thought the make install would copy everything to the correct locs.

                      Comment

                      • treyh
                        Member
                        • May 2007
                        • 64

                        #12
                        zabbix install

                        it would be nice huh :P

                        Try This:

                        cd /etc
                        mkdir zabbix
                        cp /home/zabbix/misc/conf/zabbix_server.conf /etc/zabbix/zabbix_server.conf
                        chown -R zabbix:zabbix zabbix

                        then try to start the server again and do a cat /tmp/zabbix_server.log to check for errors and etc.

                        Comment

                        • zombiehunter
                          Member
                          • Jun 2007
                          • 31

                          #13
                          ok

                          I did that and cat'd the log file. It all looks ok- everything looks like it loaded properly now. I have no zabbix file under /var/www though. Is there a whole laundry list of things im supposed to copy to various places to get the web admin stuff to work? (sorry for all the confusion. Im somewhat versed in linux but not as much as you guys.

                          Comment

                          • treyh
                            Member
                            • May 2007
                            • 64

                            #14
                            php

                            Do this:

                            cp zabbix-1.4/frontends/php/* /var/www/

                            That will copy all the php files that you need.

                            Comment

                            • zombiehunter
                              Member
                              • Jun 2007
                              • 31

                              #15
                              done and was able to open the overview page and get the actual install going- pre-install checks show
                              php
                              PHP max execution time: 30 sec Fail
                              PHP Databases support: No Fail

                              everything else looks good. am i missing a php-db module or something?

                              Comment

                              Working...