Category: Ports
Mikhail Kolesnik
These brief instructions will help you to get started with Zabbix - flexible open source monitoring solution.
This text assumes you will use apache web server with mod_php and MySQL database on a local host. It's really easy to use PostgreSQL instead: use '--with-pgsql'
in Pkgfile and adjust database/user creation steps with care. (Setting up web server is beyond the scope of this article.)
Web frontend requires few php extensions and php-mysql or php-postgresql depending on your database choice:
# prt-get depinst apache mod_php php-gd php-bcmath php-mysql
You'll probably have to increase max_execution_time
to 300 seconds and set date.timezone
in /etc/php/php.ini or equivalent file.
InnoDB storage engine is used in default sql scripts and is a far better choice than MyISAM for zabbix database tables. So, don't forget to comment out 'skip-innodb'
in /etc/my.cnf. However, before creating database (or upgrading) you can run something like
this (on your own risk):
$ sed -i 's|type=InnoDB|type=MyISAM|g' /path/to/zabbix-1.x.x/create/schema/mysql.sql
# prt-get depinst --post-install zabbix_server
# prt-get depinst --post-install zabbix_utils
# prt-get depinst --post-install zabbix_agentd
Server=server.yourdomain Hostname=somehost.yourdomain
$ cd /tmp $ tar -zxf /path/to/zabbix-1.x.x.tar.gz $ cd zabbix-1.x.x
$ mysql -u<username> -p<password> mysql> CREATE DATABASE zabbix; mysql> CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'password_as_is'; mysql> GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost'; mysql> quit; $ cd create/schema $ cat mysql.sql |mysql -u<username> -p<password> zabbix $ cd ../data $ cat data.sql |mysql -u<username> -p<password> zabbix $ cat images_mysql.sql |mysql -u<username> -p<password> zabbix
$ mkdir -p /path/to/htdocs/zbx/ $ cp -R ../../frontends/php/* /path/to/htdocs/zbx/ $ chown apache /path/to/htdocs/zbx/conf
DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=password_as_is
# /etc/rc.d/zabbix_server start # /etc/rc.d/zabbix_agentd start
zabbix_agent 10050/tcp zabbix_trap 10051/tcp
Now you must be able to log in. Default frontend user is 'Admin'
, password is 'zabbix'
.
Additional Zabbix resources:
Official manual
Support forum
Wiki