Installing Zabbix Server 3.4 on CentOS 7

How to install Zabbix Server 3.4 on CentOS 7

Installing Zabbix Server

Zabbix is an enterprise open source monitoring software for networks and applications. It is designed to monitor and track the status of various network services, servers, and other network hardware.

Zabbix uses MySQL, PostgreSQL, SQLite, Oracle to store data.Its backend is written in C and the web frontend is written in PHP.

This article we will help you in step by step installation of Zabbix 3.4 Server on CentOS 7 systems.

Prerequisites

  • CentOS 7.3 (Operating system used here)
  • root privileges.
  • Apache: 1.3.12 or later.
  • PHP: 5.4.0 or later.
  • MySQL: 5.0.3 or later.
  • OpenIPMI: Required for IPMI support.
  • libssh2: Required for SSH support. Version 1.0 or higher.
  • fping: Required for ICMP ping items.
  • libcurl: Required for web monitoring.
  • libiksemel: Required for Jabber support.
  • net-snmp: Required for SNMP support.

Step 1 :  Installing Apache, Mysql and PHP.

For installing and configuring Apache, Mysql and PHP, kindly refer the link.

Step 2: Configuring Yum Repository

Let us add, zabbix repositories package on zabbix official website. You can also use one of following commands to add zabbix repository in your system.

# rpm -Uvh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
[root@webhostingchennai ~]# rpm -Uvh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
Retrieving http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
warning: /var/tmp/rpm-tmp.TYoxVL: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:zabbix-release-3.4-2.el7         ################################# [100%]
[root@webhostingchennai ~]#

Step 3:  Install Zabbix Server with MySQL.

Now use the following command to install Zabbix server with MySQL database support packages on your system.

# yum install zabbix-server-mysql zabbix-web-mysql zabbix-proxy-mysql

Step 4: Setup Zabbix Apache Configuration.

Zabbix creates its own apache configuration file /etc/httpd/conf.d/zabbix.conf. Edit this file and just update timezone as follows.

php_value date.timezone Asia/Kolkata

Restart the service after modifying the configuration file.

# systemctl restart httpd.service

Step 5: Configuring MySQL Database for Zabbix.

This installation is using MySQL as the backend of Zabbix, So we need to create MySQL database and User for Zabbix installation.

# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE whczabbixdb CHARACTER SET UTF8;
MariaDB [(none)]> GRANT ALL PRIVILEGES on whczabbixdb.* to whczabbix@localhost IDENTIFIED BY 'password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> quit

 

MariaDB [(none)]> CREATE DATABASE whczabbixdb CHARACTER SET UTF8;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES on whczabbixdb.* to whczabbix@localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> quit

Bye

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.

# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uroot -p whczabbixdb

# zcat /usr/share/doc/zabbix-proxy-mysql*/schema.sql.gz | mysql -uroot -p whczabbixdb

Now edit Zabbix server configuration file /etc/zabbix/zabbix_server.conf and update the following database configurations as follows.

DBHost=localhost
DBName=whczabbixdb
DBUser=whczabbix
DBPassword=password

Step 6: Start Zabbix Server.

After completing setup, let’s start Zabbix server using the following command.

# service zabbix-server start

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

Step 7: Complete Zabbix Web Installer Wizard.

Zabbix web installer can be accessed on /zabbix subdirectory URL on your servers IP or domain.

http://IP_address/zabbix

installing zabbix server

Check of pre-requisites:

Check if your system has all required packages, if everything is fine click Next step.

Configure DB connection:

Enter database details created in Step #4 and click Next step to continue.

Zabbix server details:

This is the host and port of running Zabbix server. As your Zabbix server is running on the same host, so keep the values unchanged. You can give a name for your instance.

Pre-installation summary:

In this step will show the summary you have entered previous steps, so simply click Next step.

Install Zabbix:

If everything goes correctly, You will see a successful installation message on this page. This will also show you a message for created configuration file.

Zabbix Login:

Use default login credentials.

Username : admin

Password : zabbix

That’s it! we have completed the zabbix installation successfully.

For installing cacti, please click here

You may also like...