rpm -evh `rpm -qa|grep php`
yum -y install postgresql-devel httpd-devel libpng-devel freetype-devel.x86_64 libjpeg-turbo-devel.x86_64
http://cn2.php.net/distributions/php-7.1.7.tar.gz
tar xf php-7.1.7.tar.gz ./configure --prefix=/opt/php7 --enable-fpm --enable-mbstring --enable-bcmath --enable-gd-native-ttf --with-apxs2=/usr/bin/apxs --with-pgsql=/usr/src/postgresql-9.6.0/src/bin/pg_config/pg_config --enable-sockets --with-gd --with-gettext --with-jpeg-dir --with-png-dir --with-freetype-dir make && make install
cp php-7.1.7/php.ini-production /opt/php7/lib/php.ini
重啓httpd,登陸zabbix後發現,有php報錯。這是由於php版本的緣由,直接修改zabbix web目錄下include/func.inc.php文件php
sed -i '/$last = strtolower(substr($val, -1));/a$val = substr($val,0,-1);' func.inc.php
刷新頁面後即恢復正常python