How To Install Zabbix Server On Linux (CentOS 7)

How To Install Zabbix Server On Linux (CentOS 7)

Zabbix 5.0

How To Install Zabbix Server On Linux (CentOS 7)

Now, I want to show how to install newly stable Zabbix Server 5.0 on centos 7 server.

Step1: Check Centos 7 server upto date using below command

# cat /etc/redhat-release
# yum install epel-release -y
# yum -y update


Step2: Now download zabbix 5.0 repo.

# rpm -Uvh
# yum clean all
# yum install zabbix-server-mysql zabbix-agent
# yum install centos-release-scl
# vi /etc/yum.repos.d/zabbix.repo
Change enable=0 to enable=1 and save the file.

Step3: Install Zabbix-web-mysql & mariadb db.

# yum install zabbix-web-mysql-scl zabbix-apache-conf-scl
# yum -y install mariadb-server
# systemctl start mariadb
# systemctl enable mariadb
Create zabbix db and import default database. default mysql root password:"blank".
# mysql -u root -p
then, enter below command.
MariaDB > create database  zabbix_db character set utf8 collate  utf8_bin;
MariaDB > create user  zabbix_user@localhost identified by 'password';
MariaDB > grant all privileges on zabbix_db.* to  zabbix_user@localhost;
MariaDB > \q
Default Zabbix5 db using below command. Run below command and type password for zabbix_user.
# zcat /usr/share/doc/zabbix-server-mysql-4.2.3*/create.sql.gz | mysql -uzabbix_user -p zabbix_db

Step4: Edit Zabbix server configuration file (Important)

# vi /etc/zabbix/zabbix_server.conf
Edit below conf file. If this is missing can’t start Zabbix service.

Select your time zone below file.
# vi /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
See this file is last line. Enter your local time zone.
php_value[date.timezone] = Asia/Kolkata

Step5: Start all service and setup firewall. Allow web & zabbix service port.

# systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
# systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
# firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent
# firewall-cmd --add-service={http,https} --permanent
# firewall-cmd --reload
Disable selinux service & reboot your server.

Check selinux status using command
# sestatus

Open selinux config file
# vi /etc/selinux/config
set SELINUX=disabled

After save file & reboot server.
# reboot

After reboot and browse your server ip from browser. http://zabbix-server-ip/zabbix/

Step6: Start web installation step by step for complete process.

This is Zabbix 5.0. click Next >

Step7: Check of pre-requisites. Then,

Click Next >

Step8: Configure database connection. created database, (Step3 Process).

Click Next >

Step9: Zabbix-server details port, host and if you want to name here.

Click Next >

Step10: Pre-installation summary. Already you enter details so just see. Then,

Click Next >
The installation completed Then, see the Congratulation message.
Click Finish.

Step11: Then you see login page & enter Zabbix Server default user name & password.

User Name : Admin
Password : zabbix

Post a Comment