#debian #php

Como instalar o PHP 7.3 no Debian 9

por Pedro Resende em 21/02/2019 às 10:41:32

Como instalar o PHP 7.3 no Debian 9

Para poderem ter o php 7.3 no Debian 9, terão de utilizar um repositório de terceiros, neste caso do sury.

Vamos então começar, para tal vamos actualizar a lista de repositórios, executando:


# apt-get update

Agora, vamos instalar os pacotes necessários, correndo o seguinte commando:


# apt-get install ca-certificates apt-transport-https

Estamos então em condições para ir buscar o certificado do repositório:


# wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add -

Vamos então adicionar o caminho para o novo repositório


# echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list

Agora basta-nos actulizar novamente a lista de repositório e instalar a versão do php, bem como as suas extensões:


# apt-get update && apt-get install php7.3 php7.3-cli php7.3-fpm php7.3-mysql php7.3-intl php7.3-curl php7.3-json

Pronto, temos então a versão 7.3 do php instalada no nosso servidor.

Pedro Resende

Pedro Resende

With over two decades of experience as a Full Stack Developer, I have journeyed through diverse facets of software development. Commencing with the creation of compact institutional websites, I progressed to crafting portals for insurance brokers and contributed to substantial projects for renowned companies such as MS Amlin. My expertise expanded further by delving into product development for Advertiser Kwanko and collaborating with startups in their pivotal ramp-up stages. Notably, I've been involved in architecting extensive e-commerce solutions for global enterprises like Wayfair.

I currently serve as the Tech Lead at Emergn, contributing to the establishment and advancement of the Strategyzer client.