08-26-2020, 05:29 AM
Zabbix 5 Server Installation
#Install Zabbix repository
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/...noarch.rpm
#Install Zabbix server and agent
yum clean all
yum -y install zabbix-server-mysql zabbix-agent
#Install Zabbix frontend
yum -y install centos-release-scl
#enable zabbix-frontend repository.
vim /etc/yum.repos.d/zabbix.repo
:'
[zabbix-frontend]
...
enabled=1
...
'
#Install Zabbix frontend packages
yum -y install zabbix-web-mysql-scl zabbix-apache-conf-scl
#Install Mysql Database Server
yum -y install mariadb-server
#Start and Enable Database Services
systemctl start mariadb.service
systemctl enable mariadb.service
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;
'
#mysql -uroot -p'DBPassword' -e "create database zabbix character set utf8 collate utf8_bin;"
#mysql -uroot -p'DBPassword' -e "grant all privileges on zabbix.* to zabbix@localhost identified by 'Root@123';"
#On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
#Configure the database for Zabbix server
vim /etc/zabbix/zabbix_server.conf
:'
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=Root@123
'
#Configure PHP for Zabbix frontend
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
:'
php_value[date.timezone] = Asia/Kolkata
'
#setsebool -P httpd_can_network_connect on
#setsebool -P httpd_can_connect_zabbix 1
#setsebool -P zabbix_can_network 1
setenforce 0
#Start Zabbix server and agent processes
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
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
#For more details
#https://www.zabbix.com/download?zabbix=5.0&os_distribution=centos&os_version=7&db=mysql&ws=apache
#Install Zabbix repository
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/...noarch.rpm
#Install Zabbix server and agent
yum clean all
yum -y install zabbix-server-mysql zabbix-agent
#Install Zabbix frontend
yum -y install centos-release-scl
#enable zabbix-frontend repository.
vim /etc/yum.repos.d/zabbix.repo
:'
[zabbix-frontend]
...
enabled=1
...
'
#Install Zabbix frontend packages
yum -y install zabbix-web-mysql-scl zabbix-apache-conf-scl
#Install Mysql Database Server
yum -y install mariadb-server
#Start and Enable Database Services
systemctl start mariadb.service
systemctl enable mariadb.service
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;
'
#mysql -uroot -p'DBPassword' -e "create database zabbix character set utf8 collate utf8_bin;"
#mysql -uroot -p'DBPassword' -e "grant all privileges on zabbix.* to zabbix@localhost identified by 'Root@123';"
#On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
#Configure the database for Zabbix server
vim /etc/zabbix/zabbix_server.conf
:'
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=Root@123
'
#Configure PHP for Zabbix frontend
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
:'
php_value[date.timezone] = Asia/Kolkata
'
#setsebool -P httpd_can_network_connect on
#setsebool -P httpd_can_connect_zabbix 1
#setsebool -P zabbix_can_network 1
setenforce 0
#Start Zabbix server and agent processes
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
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
#For more details
#https://www.zabbix.com/download?zabbix=5.0&os_distribution=centos&os_version=7&db=mysql&ws=apache