Ad Widget

Collapse

New Installation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jon Hill
    Junior Member
    • Aug 2017
    • 6

    #1

    New Installation

    I've followed the instructions on here https://www.zabbix.com/documentation...ion_with_mysql for an Unbuntu install and get as far as the Import of the initial schema and data and it fails with no such file or directory exists create.sql.gz.

    I've checked the /usr/share/doc/zabbix-server-mysql/ and the only files that exist are changelog.debian.gz, copyright, news.debian.gz and readme.debian.

    I get no other errors during any of the other install steps.

    Can someone please point me in the direction of how to solve this issue?

    Thanks

    Jon
  • allexpetrov
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2017
    • 361

    #2
    Hi Jon Hill !

    Coudl you please post the output of the command :

    find / -name create.sql.gz (probably, you will need to run it with privileges, so use sudo) !

    Also. please post the output of:

    apt list --installed | grep zabbix

    Regards,
    Alex!

    Comment

    • Jon Hill
      Junior Member
      • Aug 2017
      • 6

      #3
      Attached screenshot of both commands.

      Thanks

      Jon
      Last edited by Jon Hill; 15-08-2017, 12:39.

      Comment

      • allexpetrov
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2017
        • 361

        #4
        Actually, you have the old 2.4 version, but you are trying to use the manual for 3.2 version.

        This one will be for you: https://www.zabbix.com/documentation..._from_packages

        But, I suggest you to delete the 2.4 and install the 3.2 version :

        Start tfrom updating the repo: https://www.zabbix.com/documentation...y_installation

        And then install the 3.2 : https://www.zabbix.com/documentation...ion_with_mysql

        There is many bugfixes and improvements.

        Regards,
        Alex!

        Comment

        • Jon Hill
          Junior Member
          • Aug 2017
          • 6

          #5
          Thanks for your help Alex, I hadn't even noticed the version being wrong.

          I've now followed the instructions you posted and then the install guide and it has all gone well up to the install of the frontend.

          When I try http://ipaddress/zabbix I just see the below PHP.

          What do I need to do to get the frontend configured and working?

          Thanks

          Jon

          <?php
          /*
          ** Zabbix
          ** Copyright (C) 2001-2017 Zabbix SIA
          **
          ** This program is free software; you can redistribute it and/or modify
          ** it under the terms of the GNU General Public License as published by
          ** the Free Software Foundation; either version 2 of the License, or
          ** (at your option) any later version.
          **
          ** This program is distributed in the hope that it will be useful,
          ** but WITHOUT ANY WARRANTY; without even the implied warranty of
          ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
          ** GNU General Public License for more details.
          **
          ** You should have received a copy of the GNU General Public License
          ** along with this program; if not, write to the Free Software
          ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
          **/


          require_once dirname(__FILE__).'/include/config.inc.php';
          require_once dirname(__FILE__).'/include/forms.inc.php';

          $page['title'] = _('ZABBIX');
          $page['file'] = 'index.php';

          // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION
          $fields = [
          'name' => [T_ZBX_STR, O_NO, null, null, 'isset({enter})', _('Username')],
          'password' => [T_ZBX_STR, O_OPT, null, null, 'isset({enter})'],
          'sessionid' => [T_ZBX_STR, O_OPT, null, null, null],
          'reconnect' => [T_ZBX_INT, O_OPT, P_SYS|P_ACT, BETWEEN(0, 65535), null],
          'enter' => [T_ZBX_STR, O_OPT, P_SYS, null, null],
          'autologin' => [T_ZBX_INT, O_OPT, null, null, null],
          'request' => [T_ZBX_STR, O_OPT, null, null, null]
          ];
          check_fields($fields);

          // logout
          if (isset($_REQUEST['reconnect'])) {
          DBstart();
          add_audit_details(AUDIT_ACTION_LOGOUT, AUDIT_RESOURCE_USER, CWebUser::$data['userid'], '', _('Manual Logout'),
          CWebUser::$data['userid']
          );
          DBend(true);
          CWebUser::logout();
          redirect('index.php');
          }

          $config = select_config();

          if ($config['authentication_type'] == ZBX_AUTH_HTTP) {
          if (!empty($_SERVER['PHP_AUTH_USER'])) {
          $_REQUEST['enter'] = _('Sign in');
          $_REQUEST['name'] = $_SERVER['PHP_AUTH_USER'];
          }
          else {
          access_deny(ACCESS_DENY_PAGE);
          }
          }

          // login via form
          if (isset($_REQUEST['enter']) && $_REQUEST['enter'] == _('Sign in')) {
          // try to login
          $autoLogin = getRequest('autologin', 0);

          DBstart();
          $loginSuccess = CWebUser::login(getRequest('name', ''), getRequest('password', ''));
          DBend(true);

          if ($loginSuccess) {
          // save remember login preference
          $user = ['autologin' => $autoLogin];

          if (CWebUser::$data['autologin'] != $autoLogin) {
          API::User()->updateProfile($user);
          }

          $request = getRequest('request');
          if (!zbx_empty($request)) {
          $url = $request;
          }
          elseif (!zbx_empty(CWebUser::$data['url'])) {
          $url = CWebUser::$data['url'];
          }
          else {
          $url = ZBX_DEFAULT_URL;
          }
          redirect($url);
          exit;
          }
          // login failed, fall back to a guest account
          else {
          CWebUser::checkAuthentication(null);
          }
          }
          else {
          // login the user from the session, if the session id is empty - login as a guest
          CWebUser::checkAuthentication(CWebUser::getSession Cookie());
          }

          // the user is not logged in, display the login form
          if (!CWebUser::$data['alias'] || CWebUser::$data['alias'] == ZBX_GUEST_USER) {
          switch ($config['authentication_type']) {
          case ZBX_AUTH_HTTP:
          echo _('User name does not match with DB');
          break;
          case ZBX_AUTH_LDAP:
          case ZBX_AUTH_INTERNAL:
          if (isset($_REQUEST['enter'])) {
          $_REQUEST['autologin'] = getRequest('autologin', 0);
          }

          if ($messages = clear_messages()) {
          $messages = array_pop($messages);
          $_REQUEST['message'] = $messages['message'];
          }
          $loginForm = new CView('general.login');
          $loginForm->render();
          }
          }
          else {
          redirect(zbx_empty(CWebUser::$data['url']) ? ZBX_DEFAULT_URL : CWebUser::$data['url']);
          }

          Comment

          • allexpetrov
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • May 2017
            • 361

            #6
            Jon,
            paste apt list --installed | grep php

            it seems that you have something wrong with your php.

            Regards,
            Alex!

            Comment

            • Jon Hill
              Junior Member
              • Aug 2017
              • 6

              #7
              List attached.

              Comment

              • allexpetrov
                Senior Member
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • May 2017
                • 361

                #8
                Originally posted by Jon Hill
                List attached.
                Sorry, there is nothing...

                Comment

                • Jon Hill
                  Junior Member
                  • Aug 2017
                  • 6

                  #9
                  Should be attached now, I missed the upload limit.
                  Attached Files

                  Comment

                  • allexpetrov
                    Senior Member
                    Zabbix Certified Trainer
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • May 2017
                    • 361

                    #10
                    So, first of all, you need php7.0-mysql , not the one you've installed (your is for PostgreSQL ).

                    Second thing, you need to check the status of your php_mod.

                    apache2ctl -M and there you need to find php7_module. If you don't have this module, then you need to install it the libapache2-mod-php (which I don't see in your output) and then enable it by issuing the command: a2enmod php7.0 and restart the apache server.

                    By the way , you are using Package installation method or you are trying to build from sources?

                    P.S. you can just copy-paste here instead of printscreening your output. just wrap it in [CODE] tag:

                    Code:
                    superuser@srv06:~$ apt list --installed | grep php
                    
                    WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
                    
                    libapache2-mod-php/xenial,xenial,now 1:7.0+35ubuntu6 all [installed,automatic]
                    libapache2-mod-php7.0/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
                    php-common/xenial,xenial,now 1:35ubuntu6 all [installed,automatic]
                    php-mysql/xenial,xenial,now 1:7.0+35ubuntu6 all [installed,automatic]
                    php7.0/xenial-updates,xenial-updates,xenial-security,xenial-security,now 7.0.22-0ubuntu0.16.04.1 all [installed]
                    php7.0-bcmath/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed]
                    php7.0-cli/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
                    php7.0-common/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
                    php7.0-gd/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed]
                    php7.0-json/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
                    php7.0-ldap/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed]
                    php7.0-mbstring/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed]
                    [B]php7.0-mysql/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed][/B]
                    php7.0-opcache/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
                    php7.0-readline/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed,automatic]
                    php7.0-xml/xenial-updates,xenial-security,now 7.0.22-0ubuntu0.16.04.1 amd64 [installed]
                    zabbix-frontend-php/unknown,unknown,now 1:3.2.7-1+xenial all [installed]
                    Last edited by allexpetrov; 15-08-2017, 13:29.

                    Comment

                    • Jon Hill
                      Junior Member
                      • Aug 2017
                      • 6

                      #11
                      Thanks for your help Alex, I think I'm going to scrap the server and start from scratch.

                      Comment

                      • allexpetrov
                        Senior Member
                        Zabbix Certified Trainer
                        Zabbix Certified SpecialistZabbix Certified Professional
                        • May 2017
                        • 361

                        #12
                        Originally posted by Jon Hill
                        Thanks for your help Alex, I think I'm going to scrap the server and start from scratch.
                        You'r welcome! Sometimes yes, it is better to start over if you've got nothing to lose. I believe that it is freshly installed Ubuntu, so you can reinstall it again.

                        But please, stick close to the manual and install from repo: https://www.zabbix.com/documentation...y_installation

                        Zabbix is well documented and this will lead you to the working Zabbix instance.

                        Regard,
                        Alex!

                        Comment

                        Working...