HowTo: Install Zabbix Server & Zabbix Agent

June 24, 2008 · Filed Under Linux 

Zabbix is a system which allow you to monitor multiple server within your local area network or even across Internet. It comes with a nice web front end which let you monitor many things that happen in the servers on your web browser, isn’t great? Basically, it runs an application in a master server, they call it Zabbix Server, and a Zabbix Agent in the server that you want to monitor. Therefore, you will have to install them separately. Agent will report almost everything you wan to the Master Server, after it received the data it starts to process for you and let you access to them in your web browser. The web script is written in PHP and using MySQL, PostgreSQL and SQLite, and it have to be installed in the Master Server as well (Maybe it can be installed separately, but i never tried that). I will only jot down the installation guide for both Server and Agent and is for MySQL only, maybe later for the configuration and settings, they are quite complicated but trust me, they worth a learn. This guide tested in CentOS 5.1 and Fedora Core 8.

[ZABBIX SERVER INSTALLATION GUIDE]

First of all make sure you have your Apache, MySQL and PHP installed in the server.

1. Download the latest version from Zabbix, and untar it.

2. Create zabbix database and import data

$ mysql -u root -p password
mysql> create database zabbix;
mysql> quit;
$ cd create/schema
$ mysql zabbix -u root -p password < mysql.sql
$ cd ../data
$ mysql zabbix -u root -p password < data.sql
$ mysql zabbix -u root -p password < images_mysql.sql

3. Go zabbix root directory which you just untar, configure and the make install

$ ./configure –enable-server –with-mysql –with-libcurl
$ make install

4. Copy startup script and config file.

$ mkdir /etc/zabbix
$ cp misc/conf/* /etc/zabbix/
$ cp misc/init.d/redhat/8.0/* /etc/init.d/
$ chmod +x /etc/init.d/zabbix_*

5. Create user zabbix, and then start the service.

$ adduser zabbix
$ service zabbix_server start

6. Copy front end web scripts in frontends/php/  into your web server document directory. DONE! You can access the frontend through your browser now. Continue to install Zabbix Agent so that you get your server data process in the Zabbix Server.

[ZABBIX AGENT INSTALLATION GUIDE]

1. Download the latest version from Zabbix, and untar it.

2. configure and make install

$ ./configure –enable-agent –with-mysql –with-libcurl
$ make install

3. Copy startup script and config file.

$ mkdir /etc/zabbix
$ cp misc/conf/* /etc/zabbix/
$ cp misc/init.d/redhat/8.0/* /etc/init.d/
$ chmod +x /etc/init.d/zabbix_*

4. Edit /etc/zabbix/zabbix_agentd.conf, set the Server and Hostname.

4. Create user zabbix, and then start the service.

$ adduser zabbix
$ service zabbix_agentd start

Thats all for the installation for Zabbix Server and the Agent, if you want to install the agent in the Master server, you can add in –enable-agent in the configure option. You can also use SNMP instead of using Agent, but i have not tried on that yet.

Comments

Leave a Reply