meta data for this page
Zmiana wersji PHP
Debian
apt-get install apt-transport-https wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
Tworzymy plik /etc/apt/sources.list.d/php7.3.list z repozytorium:
deb https://packages.sury.org/php/ stretch main
gdzie stretch to Twoja wersja Debiana (lsb_release -sc).
apt-get update apt-get install php7.3 php7.3-mysql
CentOS
Artykuł dotyczy CentOS.
Dodajemy repozytorium EPEL oraz Remi:
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
Dodatkowe narzędzia:
yum install yum-utils
Zależnie od wersji PHP, którą chcemy zainstalować - włączamy odpowiednie źródło:
yum-config-manager --enable remi-php55 [Install PHP 5.5] yum-config-manager --enable remi-php56 [Install PHP 5.6] yum-config-manager --enable remi-php72 [Install PHP 7.2]
Instalujemy PHP. Przykład dla wersji 5.6:
yum-config-manager --enable remi-php56 [Install PHP 5.6] yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo
Sprawdzamy wersję PHP:
php --version