Deploy zabbix 5.0
Turn off the firewall first
Installation environment
Here is the zabbix warehouse built by myself
vim /etc/yum.repos.d/zabbix.repo
[zabbix]
name=alibaba zabbix
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/
gpgcheck=0
enabled=1
[zabbix2]
name=alibaba zabbix frontend
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/frontend/
gpgcheck=0
enabled=1
Note: The addresses above are all from Alibaba
yum clean all
Clear the cache,
yum repolist
see if the library just built works well
yum install zabbix-server-mysql zabbix-agent
Install Zabbix server and agent
yum install centos-release-scl
Install Zabbix frontend
yum install zabbix-web-mysql-scl zabbix-apache-conf-scl
Install Zabbix front-end package
yum -y install mariadb mariadb-server
Install the database
systemctl enable mariadb
boot
systemctl start mariadb
Open the database
mysql -uroot
This can go directly to the database
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> create user zabbix@localhost identified by 'password';
Note that the password must be changed in this place, otherwise the password is password
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost;
This is the authorization command (you can also change the password here)
identified by'wanghaixiang@123';
quit;
drop out!
On the Zabbix server host, import the initial architecture and data. You will be prompted to enter the newly created password
zcat /usr/share/doc/zabbix-server-mysql-5.0.8/create.sql.gz | mysql -uzabbix -p'wanghaixiang@123' zabbix
Edit file for Zabbix server configuration database /etc/zabbix/zabbix_server.conf
DBPassword=password
(database password)
Configure the PHP
editing file for the Zabbix front end /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
, uncomment and set the correct time zone for you.
; php_value[date.timezone] = Europe/Riga
Cancel the previous comment.
php_value[date.timezone] = Asia/shanghai
We are Dongba District. Here it is Shanghai.
Start the Zabbix server and agent process
Start the Zabbix server and agent process and enable it to start when the system starts.
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
You can enter the web page configuration
http://192.168.224.180/zabbix