Warning
This article is old, and some of the information may be outdated or no longer valid today.
Please consult the latest documentation for up-to-date information.
In this post, I explain how to install and configure Zabbix on an Ubuntu 16.04 server. Zabbix is a complex monitoring system that lets you monitor multiple servers.
If you already have Zabbix installed and want to add servers to monitor, visit this post: How to add servers to Zabbix.
Start by installing LAMP on our Ubuntu server, and then we will proceed to install Zabbix.
Install the Zabbix server
# wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb
# dpkg -i zabbix-release_3.4-1+xenial_all.deb
# apt update
# apt install zabbix-server-mysql zabbix-frontend-php php7.0-mbstring php7.0-bcmath php7.0-xml curlCreate and import the database
Connect to the mysql server via SSH to create the database and its corresponding user:
# mysql -u root -p
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'TestZabbix';
MariaDB [(none)]> quit;Note: Use a more secure password; this is just an example.
To import the database, run:
# zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix You will be prompted for a password; use the one from the previous step.
Configure the database for Zabbix
Edit the configuration file to add the database connection details by running: vi /etc/zabbix/zabbix_server.conf contents:
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=TestZabbixStart the Zabbix server
# service zabbix-server start
# update-rc.d zabbix-server enablePHP configuration for Zabbix
Modify/add these PHP variables by running: vi /etc/php/7.0/apache2/php.ini contents:
post_max_size = 16M
max_execution_time = 300
max_input_time = 300
date.timezone = Europe/MadridRestart the apache server:
# service apache2 restartConfigure the Zabbix server
Now go to http://IPPúblicaServidor/zabbix/setup.php in your browser and follow the wizard. You will need to specify the database access details and the private IP of the Zabbix server.
Zabbix agent installation
Now install and configure the Zabbix agent to monitor your own Zabbix server. In the following post, I explain how to add other servers.
apt install zabbix-agentEdit the following file vi /etc/zabbix/zabbix_agentd.conf to add/modify the following variables:
Server=10.20.10.XX #Private IP of our Zabbix server
ServerActive=10.20.10.XX
Hostname=Zabbix serverYou can now start the Zabbix agent:
# update-rc.d zabbix-agent enable
# service zabbix-agent startYour Zabbix server is now installed and configured. To start using it, go to: http://IPPúblicaServidor/zabbix/ with username Admin and password zabbix
Change the language to Spanish
To change the language to Spanish, first make sure the server has the corresponding Spanish language package installed: dpkg-reconfigure locales
If Spanish is not installed, install it and then edit the following file vi /usr/share/zabbix/include/locales.inc.php, looking for the line:
'es_ES' => ['name' => _('Spanish (es_ES)'), 'display' => false ],and change it to:
'es_ES' => ['name' => _('Spanish (es_ES)'), 'display' => true],Restart the apache server
# service apache2 restartYou can now access our administrator profile to change the language:
Remember, if you have questions about this or any other issue related to your servers on Clouding, feel free to write to soporte@clouding.io We're here for whatever you need. Just ask us!