Update php 7.0 – 7.2

Debian Ubuntu update php 7.0 – 7.2

Add PPA ondrej/php

Ubuntu

add-apt-repository ppa:ondrej/php
apt update

Debian

apt install apt-transport-https lsb-release ca-certificates

wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

sh -c 'echo "deb https://packages.sury.org/php/ 
$(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'

apt update

Install PHP 7.2

sudo apt install php7.2 php7.2-common php7.2-cli php7.2-fpm

Remove PHP 7.0

 apt purge php7.1*

PHP version php -v

reload

systemctl restart php7.2-fpm
nginx -s reload

发表评论

电子邮件地址不会被公开。 必填项已用*标注