使用remi源安装
配置源
yum install epel-release
yum install https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm #remi官方源备用
yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm #remi官方源备用
安装php7.1
yum --enablerepo=remi-php71 install php php-cli php-common php-devel php-embedded php-gd php-mbstring php-pdo php-xml php-fpm php-mysqlnd php-opcache php-mcrypt php-pecl-memcached php-pecl-mongodb php-pecl-redis