CentOS7下升级PHP版本为7.2
yum provides php #自带的只有5.4版本
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm #更新源
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum remove php-common -y #移除系统自带的php-common
yum install -y php72w php72w-opcache php72w-xml php72w-mcrypt php72w-gd php72w-devel php72w-mysql php72w-intl php72w-mbstring #安装依赖包
php -v #版本变为7.2
yum provides php-fpm #因为我是准备搭建lnmp,所以安装php-fpm,这里会提示多个安装源,选择7.2版本的安装就可以了
yum install php72w-fpm.x86_64 -y