Zabbix Server安装
1,获取IP地址,关闭防火墙
[user@NewBieSlave2 ~]$ ifconfig | awk 'NR==2{print $2}'
192.168.1.99
[root@NewBieSlave2 ~]# systemctl stop firewalld.service
[root@NewBieSlave2 ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
[root@NewBieSlave2 ~]#
2)获取zabbix镜像源,清空缓存
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum clean all
yum makecache
3)安装zabbix server
yum install zabbix-server-mysql zabbix-agent
4)安装zabbix前端
yum install centos-release-scl
yum install zabbix-web-mysql-scl zabbix-apache-conf-scl
5)创建初始数据库
mysql -u root -p
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@192.168.1.66 ;
quit;
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
6)为Zabbix server配置数据库
编辑配置文件 /etc/zabbix/zabbix_server.conf
vi /etc/zabbix/zabbix_server.conf
DBPassword=password
7) 为Zabbix前端配置PHP
vi /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai
8) 启动Zabbix server和agent进程
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm