系统:Centos7 zabbix版本:4.2  

一、Zabbix Server端

  1、安装仓库
rpm -ivh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm

 

2、zabbix frontend需要安装一些不在基础包里的附加包,需要启用可选rpm库
yum -y install yum-utils
yum-config-manager --enable rhel-7-server-optional-rpms

 

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。 3、安装Server
#如果是使用postgresql,那么把mysql改为pgsql
yum install zabbix-server-mysql

 

4、启动zabbix server、并设置开机自启动
systemctl start zabbix-server
systemctl enable zabbix-server

 

二、Zabbix agent端

  1、安装zabbix agent
yum install zabbix-agent

 

2、启动zabbix agent
systemctl start zabbix-agent

 

 

三、Zabbix frontend端

  1、安装frontend
#如果是使用postgresql,那么把mysql改为pgsql
yum install zabbix-web-mysql 

 

如果报错:

Error: php70u-common conflicts with php56u-common-5.6.40-1.ius.centos7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

 

解决办法:https://www.virtualmin.com/node/39485 

yum install scl-utils
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
#到这一步就可以了
yum install php70
yum install php70-php-mysqlnd
yum install php70-php-curl
yum install php70-php-simplexml
yum install php70-php-devel php70-php-gd php70-php-json php70-php-mcrypt php70-php-mbstring php70-php-opcache php70-php-pear php70-php-pecl-apcu php70-php-pecl-geoip php70-php-pecl-imagick php70-php-pecl-json-post php70-php-pecl-memcache php70-php-pecl-xmldiff php70-php-pecl-zip php70-php-pspell php70-php-soap php70-php-tidy php70-php-xml php70-php-xmlrpc

 

  2、打开时区 vim /etc/httpd/conf.d/zabbix.conf 
php_value date.timezone Asia/Shanghai

 

3、启动httpd  
systemctl restart httpd.service

 

4、通过域名访问设置    https://domain/zabbix/setup.php   Centos7下使用yum源安装zabbix Server 随笔 第1张 Centos7下使用yum源安装zabbix Server 随笔 第2张     官方文档: https://www.zabbix.com/documentation/4.2/manual/installation/install_from_packages/rhel_centos 

 

       
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄