Home > LAMP, Linux > Installing Zabbix on Ubuntu 12.04

Installing Zabbix on Ubuntu 12.04

This post describes how to install Zabbix on Ubuntu 12.08 by compiling the Zabbix source.

This is is for test  systems – production systems must give more consideration to security not detailed in this post

  • Zabbix 2.0.8: doanload the Zabbix Sources package and unzip it
  • Ubuntu: I am 12.04 LTS fully updated
  • I have a working instance of LAMP
  • Database: MySQL
  • Create a user and database for zabbix and note down the password

First install some required packages

sudo apt-get install libmysqlclient-dev libcurl4-openssl-dev snmp snmpd libsnmp-dev libxml2-dev

Create zabbix user and group

groupadd zabbix
useradd -g zabbix zabbix

configure zabbix server and zabbix agent

sudo ./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2

install any missing packages – the above step will tell you if it needs any

if everything was satisfied, it will ask you to run the make install command

make install

edit the zabbix server conf file and update the database credentials /usr/local/etc/zabbix_server.conf

start zabbix server an zabbix agent


check if the zabbix server and agent is running – you will see a list of entries

ps -A | grep zabbix

Now to Set up the Web Front end

  • Copy zabbix-2.0.8/frontends/php to your webroot
  • I copied mine to /var/www/zabbix ( zabbix directory has all files from the php directory – dont do zabbix/php )
  • give write permissions to the web user to zabbix dir temporarily ( for creation of config files )
  • navigate to your-ip-address/zabbix ( mine is localhost/zabbix )
  • follow the installation directions
  • you will need to tweak php.ini to update some values ( /etc/php5/apache2/php.ini )
  • some of them I updated are as follows
  • post_max_size=16M

  • max_execution_time=300
  • max_input_time=300
  • date.timezone = US/Eastern

  • restart apache after updating php.ini
  • go back to your-ip-address/zabbix and follow the instructions
  • after installation is complete, you cannot directly login, you need to import database schema into your zabbix database
  • 3 files to import from zabbix-2.0.8/database/mysql to your zabbix database in this order schema.sql, images.sql, data.sql
  • now try to login using the default User: Admin and Password: zabbix
  • Hurray !!
  • Change default admin name and password
  • Remove write permissions to the zabbix directory

Set zabbix server and agent to start at boot 

# copy init scripts from the zabbix source download dir
sudo cp misc/init.d/debian/* /etc/init.d

# permissions  
sudo chmod 755 /etc/init.d/zabbix-server
sudo chmod 755 /etc/init.d/zabbix-agent

# add to start 
cd /etc/init.d
sudo update-rc.d zabbix-server defaults
sudo update-rc.d zabbix-agent defaults

# restart 
/etc/init.d/zabbix-server restart
/etc/init.d/zabbix-agent restart
Categories: LAMP, Linux Tags: ,
  1. No comments yet.
  1. No trackbacks yet.