Zabbix Installation on CentOS/RHEL 7
My next few article will explain you about Zabbix Installation (Monitoring Tool) and it’s complete administration. Here we are starting from Zabbix installation (Zabbix 3.0 LTS).
Introduction about Zabbix
Zabbix is a most popular open source monitoring tool to monitor Large scale of Enterprise Networks devices and appliances, and it is available under GNU GPL v2 License that means it’s completely True Open Source.
Zabbix is designed to monitor and Track the status information of all network Connected devices like Servers, and Switches, hubs, and all other Network hardware components.
Zabbix has almost supported all Databases like MySQL, PostgreSQL, SQLite, and Oracle IBM DB2 to store the collected information from the network. And also it supports SNMP, ICMP, TCP/IP, SSH, Telnet, HTTP and XMPP protocols to do monitoring checks over the network devices.
Zabbix Main Functions
Collect : Zabbix collects the data using multiple protocols, including Zabbix agents and agent-less options: SNMP, JMX, IPMI, trappers, SSH, Telnet and also http, https protocols.
Store : Zabbix data everything stores in a database, that means we can store unlimited data records in the database.
Manage : Historical data available in the database, and also available built-in data retention period.
Alert : Zabbix alert system supports with E-mail and SMS and Chat message, and flexible Event Acknowledgment function available on Dashboard.
Visualize : Every alert and incident will visualize on front-end dashboard and you can customize the dashboard as you want..
Zabbix Requirements (Hardware and Software):
1. Apache (HTTP) Server installation:
Install the apache (HTTP) packages using yum command, because when you install packages with yum command, the dependencies packages will also automatically install.
|[[email protected] ~]# yum install httpd httpd-devel|
|[[email protected] ~]# systemctl enable httpd|
After installation, for the first time you have to start the service with below command, if you added the service into sysconfig list (systemctl enable httpd) it will auto start when the system boots up.
|[[email protected] ~]# systemctl start httpd|
To test apache web page status, please go to any browser then type the server IP address or hostname.
|[[email protected] ~]# yum install mariadb MariaDB-server|
|[[email protected] ~]# systemctl enable mariadb|
Now start the MariaDB service with the start command.
|[[email protected] ~]# systemctl start mariadb|
* Follow this link to complete the installation of MariaDB/Mysql secure installation:
|[[email protected] ~]# systemctl restart mariadb|
Here we’re connecting MariaDB with root privileges, follow the command and use deferent DB username to connect the database server. Type the password and get into the database command line access.
Login with MariaDB root privileges.
|[[email protected] ~]# mysql -u root –predhat|
|Following commands to create and administrate the database.
MariaDB [(none)]> create database zabbixdb character set utf8;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbixdb.* to [email protected] 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)]> exit
Now it’s Zabbix time, Install Zabbix Server using with RPM Packages of the repository.
3. Zabbix Installation and Configuration:
First, download the latest version of Zabbix packages or Repository from the official website which is suitable for your OS version. Now we are installing the latest version of Zabbix 3.0 LTS.
|[[email protected] ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm|
After download and installing the Zabbix repository, now install Zabbix-server, Zabbix front-end(PHP) and Zabbix database(Mysql/MariaDB) and Zabbix-agent using yum command and it will install all the dependencies like below.
|[[email protected] ~]# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent|
After installing the zabbix packages, make sure enable the server and start the Zabbix server and Zabbix agent services.
|[[email protected] ~]# systemctl enable zabbix-server|
|[[email protected] ~]# systemctl start zabbix-server|
|[[email protected] ~]# systemctl enable zabbix-agent|
|[[email protected] ~]# systemctl start zabbix-agent|
Zabbix is providing the schema database for default templates and front-end operations. after installation Zabbix will create the schema file in “/usr/share/doc/zabbix-server-mysql-3.0.4 directory“. Import the schema data into our local database as below.
|[[email protected] ~]# zcat /usr/share/doc/zabbix-server-mysql-3.0.4/create.sql.gz | mysql -u root -p zabbixdb|
Setup apache to load php module with below parametres and edit the configuration file for zabbix front-end setup.
|[[email protected] ~]# vim /etc/httpd/conf.d/zabbix.conf|
| php_value max_execution_time 600
php_value memory_limit 256M
php_value post_max_size 32M
php_value upload_max_filesize 8M
php_value max_input_time 600
php_value always_populate_raw_post_data -1
php_value date.timezone Asia/Kolkata
Edit Zabbix-server configuration file and provide the Database, DB user credentials to connect the local database server.
|[[email protected] ~]# vim /etc/zabbix/zabbix_server.conf|
|[email protected] zabbix-server-mysql-3.0.4]# systemctl restart zabbix-server|
Conclusion: This is all about Zabbix installation in command-line. For front end configuration and complete administration please follow the next article.