09-16-2020, 07:25 AM
Zabbix 5 Server Installation
#Install Zabbix repository
Sudo rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/...noarch.rpm
#Install Zabbix server and agent
Sudo yum clean all
Sudo yum -y install zabbix-server-mysql zabbix-agent
#Install Zabbix frontend
Sudo yum -y install centos-release-scl
#enable zabbix-frontend repository
Sudo vim /etc/yum.repos.d/zabbix.repo
:'
[zabbix-frontend]
...
enabled=1
...
'
#Install Zabbix frontend packages
Sudo yum -y install zabbix-web-mysql-scl zabbix-apache-conf-scl
#Install Mysql Database Server
Sudo yum -y install mariadb-server
#Start and Enable Database Services
Sudo systemctl start mariadb.service
Sudo systemctl enable mariadb.service
Sudo systemctl status mariadb.service
#Create initial database
mysql_secure_installation
mysql -u root -p
:'
create database zabbix character set utf8 collate utf8_bin;
create user zabbix@localhost identified by 'password';
grant all privileges on zabbix.* to zabbix@localhost;
'
#On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
Sudo zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
#Configure the database for Zabbix server
Sudo vim /etc/zabbix/zabbix_server.conf
:'
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=Root@123
'
#Configure PHP for Zabbix frontend
Sudo vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
:'
php_value[date.timezone] = Asia/Kolkata
'
#Start Zabbix server and agent processes
Sudo systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
Sudo systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
#Allow From Firewall
firewall-cmd --permanent --add-port={10050,10051}/tcp
#firewall-cmd --permanent --add-service={http,https}
firewall-cmd --reload
#Access Zabbix Web Frontend
#http://your_server_ip/zabbix or http://your_server_ip:port/zabbix
# For Change the port
In case you want to change the port then do a configuration in
vim /etc/httpd/conf.d/zabbix.conf
‘:
><virtualhost *:10011>
>ServerName 192.168.1.0
>DocumentRoot /usr/share/zabbix
></virtualhost>
'