centos 更新php到php7.2
前言
由于最新的wordpress-5.3.2推荐使用php7.3,但是原来搞好的centos7上的php环境为7.0,所以想更新一下php环境。
开始更新PHP更新源:
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:
yum install -y php72w php72w-opcache php72w-xml php72w-mcrypt php72w-gd php72w-devel php72w-mysql php72w-intl php72w-mbstring php72w-redis php72w-redis php72w-pdo
更新php fpm:
yum install php72w-fpm
systemctl start php-fpm.service # 启动
systemctl enable php-fpm.service # 开机自启动