$ sudo apt update $ sudo apt upgrade $ sudo apt install ca-certificates apt-transport-https software-properties-common
$ sudo add-apt-repository ppa:ondrej/php
# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
More info: https://launchpad.net/~ondrej/+archive/ubuntu/php
Press [ENTER] to continue or Ctrl-c to cancel adding it.
// Tekan Enter
$ sudo apt update
$ sudo apt install php8.0 libapache2-mod-php8.0
$ sudo systemctl restart apache2
$ sudo apt install php8.0-fpm libapache2-mod-fcgid
$ sudo a2enmod proxy_fcgi setenvif
$ sudo a2enconf php8.0-fpm
$ sudo systemctl restart apache2
$ php --version
PHP 8.0.8 (cli) (built: Jul 1 2021 15:26:46) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.8, Copyright (c) Zend Technologies
with Zend OPcache v8.0.8, Copyright (c), by Zend Technologies