LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Sunday, December 12, 2021

Install PHP 8 on Debian 11

0 comments


By default, PHP 8.0 is not included in the Debian 11 default repository. So you will need to add the PHP Sury repository to your server.


First, install the required dependencies using the following command:


sudo apt-get install gnupg2 ca-certificates apt-transport-https software-properties-common -y


Next, add the PHP Sury repository to APT and add the GPG key with the following command:


sudo echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list

sudo wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add -


Next, update the repository and install PHP 8.0 with all necessary PHP extensions needed using the following command:


sudo apt-get update -y

sudo apt-get install php libapache2-mod-php php-pear php-cgi php-common php-mbstring php-zip php-net-socket php-gd php-xml-util php-curl php-imagick php-mysql php-bcmath unzip wget git -y


You can now check the PHP version using the command below:


php -v


Referenece:

https://cloudinfrastructureservices.co.uk/install-wordpress-on-debian-10-11/

No comments:

Post a Comment