Zabbix 2.2 install guide SLES 11 SP2 / mysql

Share This:

This guide is produced by trying to implement zabbix using https://www.zabbix.org/wiki/Install_on_openSUSE_/_SLES
Following guide from zabbix.org creates many issues which are now solved therefore I’m showing a correct way of installation and configuration. I have highlighted were zabbix.org guide is not correct.

Add repositories:
zypper addrepo http://download.opensuse.org/repositories/server:/monitoring/openSUSE_12.3 server_monitoring
You also NEED SLES11 SP2 SDK and SDK updates repositories (from your SMT) for php53 packages.
Update:
zypper update
zypper install zabbix-server-mysql
zypper install mysql mysql-client

In the MySQL console replace by the FQDN of the zabbix server (you can use localhost if the DB is on the same server)replace by the IP address of the zabbix server (you can leave those 2 lines out if the DB is on the same server)if you will run the zabbix frontend on a third server, you should also copy these 4 lines with the FQDN and IP of the frontend server replace ‘password’ by the actual password you want for the zabbix database user
mysql> CREATE DATABASE zabbix CHARACTER SET utf8;
mysql> GRANT ALL privileges ON zabbix.* TO zabbix@;
mysql> GRANT usage ON *.* TO zabbix@ IDENTIFIED BY 'zabbix';
mysql> GRANT ALL privileges ON zabbix.* TO zabbix@;
mysql> GRANT usage ON *.* TO zabbix@ IDENTIFIED BY 'zabbix';
mysql> SET password FOR zabbix = password('password');
mysql> exit

Copy the DB schemes from /usr/share/doc/packages/zabbix-server/mysql/ to the database server if needed
and import the schemes:
mysql -uroot -p zabbix < schema.sql
mysql -uroot -p zabbix < images.sql
mysql -uroot -p zabbix < data.sql

Configure mysql to start up during server boot:
insserv mysql

Edit /etc/zabbix/zabbix-server.conf to set up zabbix database users’ password
Start the zabbix-server process
rczabbix-server start
Configure zabbix-server to start up during server boot:
insserv zabbix-server

(Correct using Installing Zabbix from source guide) Frontend:
zypper install apache2 apache2-mod_php5 php53-gettext php53-mbstring php53-gd (any other package require during install it's always php-53

Enable the Apache PHP5 module:
a2enmod php53
Enable the Zabbix front-end website by setting the ‘ZABBIX’ flag in Apache:
a2enflag ZABBIX
Edit the front-end configuration file /usr/share/zabbix/conf/zabbix.conf.php to reflect you setup (database type, host, user, password and zabbix server host) or follow steps of automated setup
MY CONFIG WAS BROKEN, make sure that DBSocket=/var/lib/mysql/mysql.sock (if default), my config had by default /var/lib/mysql – hence it didn’t work.
Make sure apache is started on server startup:
insserv apache2
Copying PHP files
Zabbix frontend is written in PHP, so to run it a PHP supported webserver is needed. Installation is done by simply copying the PHP files from frontends/php to the webserver HTML documents directory.
Common locations of HTML documents directories for Apache web servers include:
/srv/www/htdocs (OpenSUSE, SLES)
It is suggested to use a subdirectory instead of the HTML root. To create a subdirectory and copy Zabbix frontend files into it, execute the following commands, replacing the actual directory:
mkdir /zabbix
cd frontends/php
cp -a . /zabbix

Start apache server manually for now
rcapache2 start
Install agent:
zypper install zabbix-agent
insserv zabbix-agent
Edit /etc/zabbix/zabbix_agentd.conf and point the agent to the zabbix server by changing the Server and ServerActive settings.
Start the agent (service zabbix-agent start or for SUSE: rczabbix-agentd start)

Feel free to contact me if you are stuck anywhere. Problem with the guide from zabbix.org is:
1- Doesn’t mention you need SLES11 SP2 SDK and Updates repositories
2- Mixes up packages from PHP5 and PHP53 throughout the setup, while you need PHP53
3- Issue with DBSocket variable in zabbix config that should be pointed to mysql.sock file
4- Issue with frontend install, misses too many dependencies, better to copy the files manually to web directory and install apache2 that will present it out.

Have fun.

Leave a comment

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

Time limit is exhausted. Please reload the CAPTCHA.