Menu

Installing Zabbix

March 15, 2017 - Guides, Linux
Installing Zabbix

 

 

On this article i’ll show the necessary steps needed to install Zabbix.

 

What is Zabbix?

“Zabbix is the ultimate enterprise-level software designed for real-time monitoring of millions of metrics collected from tens of thousands of servers, virtual machines and network devices.
Zabbix is Open Source and comes at no cost.”

 

I’ll install Zabbix from source, this way I can get the latest version, usually zabbix present at repositories is not the latest version.
So, let’s start by downloading the software, navigate to http://www.zabbix.com/download, scroll down to the “Zabbix Sources” section and download the appropriate version.

Let’s create a user and group to run zabbix
groupadd zabbix
useradd -g zabbix zabbix

Create zabbix Database and mysql user, login on mysql as root and run the following commands:

create database zabbix;
grant all privileges on zabbix.* to “zabbix”@localhost identified by “mypasswd”;

flush privileges;

Now we need to populate the database with zabbix data, navigate to zabbix source files, there you’ll find the data to import under “/database/mysql”
mysql -u zabbix -p zabbix < schema.sql
mysql -u zabbix -p zabbix < images.sql
mysql -u zabbix -p zabbix < data.sql

Now go back to the sources root and compile Zabbix
./configure –enable-server –enable-agent –with-mysql –with-net-snmp –with-libcurl –with-libxml2
make install

In my case I needed to install the following packages to be able to compile:

apt-get install libmysqlclient-dev  libmysqld-dev libxml2-dev libsnmp-dev

Now you can configure the local zabbix agent:
vi /usr/local/etc/zabbix_agentd.conf

and zabbix server:
vi /usr/local/etc/zabbix_server.conf

Once that’s done, start zabbix (check the log file to make sure everything starts correctly)
zabbix_server

And start the local agent:
zabbix_agentd

Copy zabbix frontend to your webhost:
cd frontends/php
cp -a * <htdocs>/zabbix

Open the webpage that points to where you copy the front-end and follow instructions:

If PHP settings are not according to Zabbix needs, it will tell you should be changed:

Correct the PHP settings if needed and input your database details:

Confirm the configuration data and you’re done.

Open Zabbix page and login with default account:

User: admin

Pass: zabbix

Now your ready to start configuring all monitoring rules needed.

On Zabbix website you can find pre-compiled agents for several systems/kernels, so you just need to copy the agent, adjust agent config file and execute agent.

If you need any help installing or configuring Zabbix, leave a comment bellow.

Please follow and like me at:

Leave a Reply

Your email address will not be published. Required fields are marked *