— UPDATE: Zabbix 2.2 is out now, you can download the installation packages for Debian Wheezy, Ubuntu Precise and RedHat Enterprise Linux 6 at http://www.zabbix.com/download.php

Here is how-to install Zabbix 2.0.4 on Ubuntu 12.04 Precise.

1. Prerequisites

Edit /etc/apt/sources.list and add the following Zabbix repository:

deb http://ppa.launchpad.net/tbfr/zabbix/ubuntu precise main deb-src http://ppa.launchpad.net/tbfr/zabbix/ubuntu precise main

Install the public key of the repository and update your package index:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C407E17D5F76A32B sudo apt-get update

2. Install the Zabbix server with

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

This will also install Apache, PHP and MySQL if they have not been installed yet. Then create a user and database called zabbix on the server. Edit /etc/zabbix/zabbix_server.conf and edit the following settings to match your database:

DBName=zabbix DBUser=zabbix DBPassword=<your_password>

Import the database structure

cd /usr/share/zabbix-server-mysql/ gunzip *.gz mysql -u zabbix -p zabbix < schema.sql mysql -u zabbix -p zabbix < images.sql mysql -u zabbix -p zabbix < data.sql

The order in which you import the sql files is important, if you import them in another order your will receive foreign key constraint errors. The Zabbix server is set up now and you can start it. First edit /etc/default/zabbix-server and set start

START=yes

the run

/etc/init.d/zabbix-server start

The output of ps aux should show* /usr/sbin/zabbix_server* in the process list, if not please check the log file /var/log/zabbix-server/zabbix_server.log for errors.

3. Configure the Zabbix webinterface

Zabbix has certain PHP requirements, so edit /etc/php5/apache2/php.ini and set

post_max_size = 16M max_execution_time = 300 max_input_time = 300 date.timezone = UTC

Copy the sample Apache configuration file into the Apache directory, make sure the Apache alias module is enabled and restart Apache

cp /usr/share/doc/zabbix-frontend-php/examples/apache.conf /etc/apache2/conf.d/zabbix.conf a2enmod alias /etc/init.d/apache2 restart

Copy the sample php configuration file to the Zabbix folder

cp /usr/share/doc/zabbix-frontend-php/examples/zabbix.conf.php.example /etc/zabbix/zabbix.conf.php

and update your database details in /etc/zabbix/zabbix.conf.php

$DB['DATABASE'] = 'zabbix'; $DB['USER'] = 'zabbix'; $DB['PASSWORD'] = '<your_password>';

The installation is now complete and you can login to the webinterface at http://<your_server>/zabbix/ with the default user admin and the password zabbix.

**4. **Install the Zabbix client

To install the Zabbix client just follow the prerequisites in step 1 if not done so already, then install the client with

apt-get install zabbix-client

Edit /etc/zabbix/zabbix_agentd.conf and set the Server variable to the hostname or IP address of your Zabbix server.

Server=zabbix.example.org

Restart the Zabbix agent with

/etc/init.d/zabbix-agent restart

and login to the Zabbix webinterface, go to Configuration > Hosts and click on Create host. Enter the client host name and an IP address or DNS name, select a group it should be part of, e.g. Linux servers, click on Templates and select a template like Template OS Linux, and finally click Save.