rpm -ivh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm
yum -y install yum-utils yum-config-manager --enable rhel-7-server-optional-rpms
#若是是使用postgresql,那麼把mysql改成pgsql yum install zabbix-server-mysql
systemctl start zabbix-server
systemctl enable zabbix-server
yum install zabbix-agent
systemctl start zabbix-agent
#若是是使用postgresql,那麼把mysql改成pgsql yum install zabbix-web-mysql
若是報錯:php
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 node
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
php_value date.timezone Asia/Shanghai
systemctl restart httpd.service