Instalar Zabbix Server 3.2 en Ubuntu 16.04



Zabbix es un software de código abierto para el monitoreo de redes y aplicaciones. Proporciona agentes para monitorear hosts remotos, así como también incluye soporte para monitoreo vía SNMP, TCP e ICMP. 
Zabbix-Monitoring

Instalar Apache, MySQL and PHP

$ sudo apt-get update
$ sudo apt-get install apache2 
$ sudo apt-get install mysql-server mysql-client 
$ sudo apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php php-xml php-mbstring php-bcmath
Actualizar el  timezone en el php.ini

$ sudo nano /etc/php/7.0/apache2/php.ini
[Date]
; http://php.net/date.timezone
date.timezone = 'America/Buenos_Aires' 
 $ sudo service apache2 restart 

Agregar Zabbix al Repositorio 

$ wget https://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
$ sudo dpkg -i zabbix-release_3.2-1+xenial_all.deb
$ sudo apt-get update

Instalar Zabbix Server

$ sudo apt-get install zabbix-server-mysql zabbix-frontend-php

Crear Database Schema

$ mysql -u root -p

mysql> CREATE DATABASE zabbix;
mysql> GRANT ALL on zabbix.* to zabbix@localhost IDENTIFIED BY 'zabbix';
mysql> quit;
$ cd /usr/share/doc/zabbix-server-mysql
$ zcat create.sql.gz | mysql -u zabbix -p zabbix

Editar el archivo de configuración 

$ sudo nano /etc/zabbix/zabbix_server.conf 
  DBHost=localhost
  DBName=zabbix
  DBUser=zabbix
  DBPassword=zabbix

Reiniciar Apache y Zabbix

$ sudo service apache2 restart
$ sudo service zabbix-server restart

Iniciar el instalador web Zabbix 
http://localhost/zabbix/

 

 

 

 

 

 

 

 

 

Zabbix Login Screen

   Username:  Admin
   Password:  zabbix





Comentarios

  1. Después de tanto buscar me encontré con este post y me salvo la vida, Muchas Gracias!!!
    Excelente trabajo...

    ResponderBorrar
  2. Sigo todos los pasos, pero al intentar la conexión con la base a travez de la web me da error de conex..... he intentado de todo y de ahi no salgo.
    Agradezco una ayuda

    ResponderBorrar
  3. podrias pegarme parte del error que te muestra, a ver si puedo ayudarte

    ResponderBorrar
  4. Hola, tuve que rehacer mi máquina por problemas en el disco y me encuentro con la agradable sorpresa que una vez instalado nuevamente zabbix, pude terminar de instalar. Muchas gracias y cualquier cosa, te vuelvo a molestar. Gracias de nuevo

    ResponderBorrar
  5. Victor, De los manuales más simples y fáciles para instalar zabbix.
    Es una pequeña joya.
    Enhorabuena.

    ResponderBorrar
  6. saludos, soy nuevo en esto y me sale siempre el mensaje.

    Details Cannot connect to the database. Unable to select configuration.

    me puedes ayudar..gracias

    ResponderBorrar
  7. Hola Victor, pude hacer la instalación pero el ejecutar un browser no logro interpretar el código php del zabbix-frontend.
    Qué podrá ser? faltara alguna librería php?
    Veo algo así:

    run(ZBase::EXEC_MODE_SETUP); } catch (Exception $e) { (new CView('general.warning', [ 'header' => $e->getMessage(), 'messages' => [], 'theme' => ZBX_DEFAULT_THEME ]))->render(); exit; } // VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION $fields = [ 'type' => [T_ZBX_STR, O_OPT, null, IN('"'.ZBX_DB_MYSQL.'","'.ZBX_DB_POSTGRESQL.'","'.ZBX_DB_ORACLE.'","'.ZBX_DB_DB2.'","'.ZBX_DB_SQLITE3.'"'), null], 'server' => [T_ZBX_STR, O_OPT, null, null, null], 'port' => [T_ZBX_INT, O_OPT, null, BETWEEN(0, 65535), null, _('Database port')], 'database' => [T_ZBX_STR, O_OPT, null, NOT_EMPTY, null, _('Database name')], 'user' => [T_ZBX_STR, O_OPT, null, null, null], 'password' => [T_ZBX_STR, O_OPT, null, null, null], 'schema' => [T_ZBX_STR, O_OPT, null, null, null], 'zbx_server' => [T_ZBX_STR, O_OPT, null, null, null], 'zbx_server_name' => [T_ZBX_STR, O_OPT, null, null, null], 'zbx_server_port' => [T_ZBX_INT, O_OPT, null, BETWEEN(0, 65535), null, _('Port')], // actions 'save_config' => [T_ZBX_STR, O_OPT, P_SYS, null, null], 'retry' => [T_ZBX_STR, O_OPT, P_SYS, null, null], 'cancel' => [T_ZBX_STR, O_OPT, P_SYS, null, null], 'finish' => [T_ZBX_STR, O_OPT, P_SYS, null, null], 'next' => [T_ZBX_STR, O_OPT, P_SYS, null, null], 'back' => [T_ZBX_STR, O_OPT, P_SYS, null, null], ]; CSession::start(); CSession::setValue('check_fields_result', check_fields($fields, false)); if (!CSession::keyExists('step')) { CSession::setValue('step', 0); } // if a guest or a non-super admin user is logged in if (CWebUser::$data && CWebUser::getType() < USER_TYPE_SUPER_ADMIN) { // on the last step of the setup we always have a guest user logged in; // when he presses the "Finish" button he must be redirected to the login screen if (CWebUser::isGuest() && CSession::getValue('step') == 5 && hasRequest('finish')) { CSession::clear(); redirect('index.php'); } // the guest user can also view the last step of the setup // all other user types must not have access to the setup elseif (!(CWebUser::isGuest() && CSession::getValue('step') == 5)) { access_deny(ACCESS_DENY_PAGE); } } // if a super admin or a non-logged in user presses the "Finish" or "Login" button - redirect him to the login screen elseif (hasRequest('cancel') || hasRequest('finish')) { CSession::clear(); redirect('index.php'); } $theme = CWebUser::$data ? getUserTheme(CWebUser::$data) : ZBX_DEFAULT_THEME; DBclose(); /* * Setup wizard */ $ZBX_SETUP_WIZARD = new CSetupWizard(); // if init fails due to missing configuration, set user as guest with default en_GB language if (!CWebUser::$data) { CWebUser::setDefault(); } // page title (new CPageHeader(_('Installation'))) ->addCssFile('styles/'.CHtml::encode($theme).'.css') ->addJsFile('js/browsers.js') ->addJsFile('jsLoader.php?ver='.ZABBIX_VERSION.'&lang='.CWebUser::$data['lang']) ->display(); /* * Displaying */ $link = (new CLink('GPL v2', 'http://www.zabbix.com/license.php')) ->setTarget('_blank') ->addClass(ZBX_STYLE_GREY) ->addClass(ZBX_STYLE_LINK_ALT); $sub_footer = (new CDiv(['Licensed under ', $link]))->addClass(ZBX_STYLE_SIGNIN_LINKS); (new CTag('body', true, [(new CDiv([$ZBX_SETUP_WIZARD, $sub_footer]))->addClass(ZBX_STYLE_ARTICLE), makePageFooter()])) ->show(); ?>

    ResponderBorrar
  8. Hola cuando corro este comando me pide un password

    zcat create.sql.gz | mysql -u zabbix -p zabbix

    soporte@fda-ubuntu-v01:/usr/share/doc/zabbix-server-mysql$ zcat create.sql.gz | mysql -u zabbix -p zabbix
    Enter password:


    cual es ??

    ResponderBorrar
  9. GRANT ALL on zabbix.* to zabbix@localhost IDENTIFIED BY 'zabbix';

    Hay te dice que la pass es Zabbix

    ResponderBorrar
  10. victor instale todo perfecto luego de reinicar el server por otro motivo cuando entro al zabbix dice server zabbix is not running the information .... reinicio el servicio y no levanta sigue con la misma leyenda.

    ResponderBorrar
  11. En la instalación web me dio el error "PHP bcmath extension missing (PHP configuration parameter --enable-bcmath) ..."
    lo solucione con:
    sudo apt install php7.1-bcmath

    ResponderBorrar

Publicar un comentario