How To Install Zabbix Server On CentOS 76 min read
Zabbix is an opensource monitoring system written by php mysql and apache. So I want to configure Zabbix Server on CentOS 7. First install CentOS 7 machine on your network.
★ How To Install Laravel On Ubuntu 16.04 With Phpmyadmin and Mysql
★ How To Install WordPress (CMS) on Ubuntu 16.04
- Install web server
- Install php
- Install mariadb server
- Create Zabbix DB
- Install Zabbix mysql DB
- Import Zabbix sql file into DB
- Configure Zabbix Server conf file
- Configure Zabbix agent conf file
- Allow firewall port 10051/tcp,10050/tcp
- Selinux must be disable
- reboot your server
Step #01: Install web server and enable it.
[[email protected] ~]# yum -y install httpd [[email protected] ~]# systemctl start httpd [[email protected] ~]# systemctl enable httpd [[email protected] ~]# yum -y install epel-release
Step #02: Install php using below command.
[[email protected] ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm [[email protected] ~]# yum -y install mod_php72w php72w-cli php72w-common php72w-devel php72w-pear php72w-gd php72w-mbstring php72w-mysql php72w-xml php72w-bcmath
Step #03: Increase execution time, upload size and date time zone. Open php.ini file.
[[email protected] ~]# vi /etc/php.ini
Insert all below lines into php.ini file
max_execution_time = 600
max_input_time = 600
memory_limit = 256M
post_max_size = 32M
upload_max_filesize = 16M
date.timezone = Asia/Dhaka
Restart web server using below command
[[email protected] ~]# systemctl restart httpd
Step #04:Â Install Zabbix mysql Database.
[[email protected] ~]# yum -y install mariadb-server [[email protected] ~]# systemctl start mariadb [[email protected] ~]# systemctl enable mariadb [[email protected] ~]# mysql_secure_installation
Create Zabbix database for store all data
[[email protected] ~]# mysql -u root -p
Database create command below
create database zabbix;
grant all privileges on zabbix.* to [email protected]'localhost' identified by 'passw0rd';
grant all privileges on zabbix.* to [email protected]'%' identified by 'passw0rd';
flush privileges;
\q
Step #05: Download rpm package run below command.
[[email protected] ~]# yum -y install http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
Install Zabbix Mysql using command below
[[email protected] ~]# yum -y install zabbix-get zabbix-server-mysql zabbix-web-mysql zabbix-agent [[email protected] ~]# cd /usr/share/doc/zabbix-server-mysql-3.4.6/ [[email protected] ~]# gunzip create.sql.gz [[email protected] ~]# mysql -u root -p zabbix < create.sql
Step #06: Check Zabbix Server conf file and make sure insert below line.
[[email protected] ~]# vi /etc/zabbix/zabbix_server.conf
Insert below lines
DBHost=localhost
DBPassword=passw0rd
DBName=zabbix
Enable and restart Zabbix Service
[[email protected] ~]# systemctl start zabbix-server
[[email protected] ~]# systemctl enable zabbix-server
Step #07: Configure Zabbix agent conf file. open below file.
[[email protected] ~]# vi /etc/zabbix/zabbix_agentd.conf
And ensure that all line are contain conf file
Server=127.0.0.1 ServerActive=127.0.0.1 Hostname=Zabbix-Server
Enable and start Zabbix agent service
systemctl start zabbix-agent systemctl enable zabbix-agent
Step #08: Configure firewall for allow Zabbix port.
[[email protected] ~]#yum -y install firewalld
Start and enable firewall service
[[email protected] ~]# systemctl start firewalld [[email protected] ~]# systemctl enable firewalld
Step #09: Add http and Zabbix port allow.
[[email protected] ~]# firewall-cmd --add-service={http,https} --permanent [[email protected] ~]# firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent [[email protected] ~]# firewall-cmd --reload [[email protected] ~]# firewall-cmd --list-all
Finally restart below services
[[email protected] ~]# systemctl restart zabbix-server [[email protected] ~]# systemctl restart zabbix-agent [[email protected] ~]# systemctl restart httpd
Very important for disable selinux
[[email protected] ~]#Â Â vi /etc/selinux/config
Change to from enforcing
SELINUX=disabled
Esc :wq Press Enter.
Then reboot your server.
[[email protected] ~]# reboot
Goto http://Server_ip/zabbix/
For more installation process see my video
After web installation process completed then login using details
User Name : Admin [‘A’ must be capital]
Password : zabbix
If you see details so please visit my YouTube channel. Please subscribe my channel for more update.
- 9 Ways to Speed Up Your MacBook Yosemite - February 21, 2023
- How To Install GitLab CE on Ubuntu 22.04 - December 15, 2022
- 7 Things to Know About Laptop Internet Cards - October 26, 2022
We really appreciate for your support for buying me a coffee.
It takes us a while to compose and upload new content, as they have to be checked to see if Properly works. We appreciate you if you help me for one cup of coffee to keep us awake and always deliver good quality content.
No contribution is small of an amount. We are grateful for any amount you support us with. Thank you!
Hi,
Great article! This got me up and running, thanks. Should the above install commands still apply for Zabbix 4.2?
Welcome! 🙂