Setup Zabbix Centos7 step by step

Install apache marialDB php

Apache

sudo yum install httpdsudo systemctl start httpd.service

If you have nginx installed. need to stop it first (systemctl stop nginx)

MarialDB

sudo yum install mariadb-server mariadbsudo systemctl start mariadbsudo mysql_secure_installation

Php

sudo yum install php php-mysql

test installation

sudo vi /var/www/html/info.php

add line

<?php phpinfo(); ?>

curl http://localhost/info.php

Install Zabbix

sudo rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpmsudo yum clean allsudo yum install zabbix-server-mysql zabbix-web-mysqlsudo yum install zabbix-agent

config zabbix database

mysql -u rootcreate database zabbix character set utf8 collate utf8_bin;grant all privileges on zabbix.* to zabbix@localhost identified by ‘secret’;flush privileges;quit;

Import zabbix database

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

update mysql config in conf

sudo vi /etc/zabbix/zabbix_server.confDBHost=localhostDBName=zabbixDBPassword=secret

update timezone

sudo vi /etc/httpd/conf.d/zabbix.conf# php_value date.timezone {YOUR_TIMEZONE}

timezone list can be find here https://www.php.net/manual/en/timezones.asia.php

Restart services

sudo systemctl restart httpdsudo systemctl start zabbix-serversudo systemctl start zabbix-agentsudo systemctl enable zabbix-serversudo systemctl enable zabbix-agentsudo systemctl status zabbix-server
sudo systemctl status zabbix-agent

open http://your_ip/zabbix/setup.php

make sure all status are ‘ok’

key in your database password

credential for first login : Admin/zabbix

Done

Fix error — “Zabbix server is not running”

#1 vi /etc/zabbix/web/zabbix.conf.php

Make sure mysql server/username/password/hostname is correct

#2 vi /etc/zabbix/zabbix_server.conf

make sure dbhost dbname dbpassword is correct

#3 Important: If SELinux is running in enforcing mode, you need to put it into permissive mode

sudo setenforce 0

--

--

--

A Senior Software Developer/Body builder . to help others enjoy coding and stay healthy

Love podcasts or audiobooks? Learn on the go with our new app.

Engineer Your Own Production Ready Distributed RL Environment - Part 1/3

Using GitLab and Cloud Build to achieve CI/CD for Cloud Run

TERATTO METAVERSE

How to add new YCB model into Drake simulation

Multi-VRF Extension over FlexVPN

Difference between GraphQL and REST

Consuming RSS feeds from Flink SQL

Leetcode Challenge May 29 — N-Queens II

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
LORY

LORY

A Senior Software Developer/Body builder . to help others enjoy coding and stay healthy

More from Medium

Leetcode — 1. Two Sum

[LeetCode] (Easy) 58. Length of Last Word

Leetcode — 1 problem

Leetcode — Construct K Palindrome Strings