Install Zabbix Server with MySQL

Configure Yum Repository

Zabbix repositories package on Zabbix official website. http://repo.zabbix.com/zabbix/. You can follow below commands to add Zabbix repository in the system. Install latest rpm package every time.

# rpm -Uvh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.2.1-1.el7.noarch.rpm
# rpm -qa | grep zabbix

Install Zabbix Server with MySQL

You have added Zabbix yum repository in above step. Now use following command to install Zabbix server with MySQL database support packages on server.
# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway

Setup Zabbix Apache Configuration

Zabbix creates its own apache configuration file /etc/httpd/conf.d/zabbix.conf. Edit this file and just update timezone.
php_value date.timezone America/Toronto
 
Restart the Apache service.
 
# service httpd restart
 

Create Zabbix MySQL Database

This installation is using MySQL as backend of Zabbix, So we need to create MySQL database and User for Zabbix installation.
# mysql -u root -p
 
mysql> CREATE DATABASE zabbixdb CHARACTER SET UTF8;
mysql> GRANT ALL PRIVILEGES on zabbixdb.* to zabbix@localhost IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> quit
 
After creating database restore the default MySQL database provided by Zabbix. These files can be found at /usr/share/doc/zabbix-server-mysql-<version>/create/ directory.
# cd /usr/share/doc/zabbix-server-mysql-3.0.0/create
 
# mysql -u zabbix -p zabbixdb < schema.sql
# mysql -u zabbix -p zabbixdb < images.sql
# mysql -u zabbix -p zabbixdb < data.sql

Start Zabbix Server

After completing above setup, let’s start Zabbix server using following command.
# service zabbix-server start
 

After starting Zabbix service, let’s go to Zabbix web installer and finish the installation.

Previous Post.                                                                                                                     Next Post


Comments

Popular posts from this blog

How to measure disk performance with fio and IOPing

How to Install Apache on CentOS 7

Install and configure Jenkins on Ubuntu 16.04