Hari ini saya melakukan upgrade PHP 7.3 ke 7.4 dengan cara sebagai berikut:
sudo apt update
sudo apt upgrade
sudo apt -y install lsb-release apt-transport-https ca-certificates wget
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt update
sudo apt install php7.4
sudo update-alternatives --set php /usr/bin/php7.4
sudo apt-get install libapache2-mod-php7.4
php -v
sudo apt install php7.4-{bcmath,bz2,intl,gd,mbstring,mysql,zip,curl}
// for Nginx, edit di /etc/nginx/sites-available/default
sudo apt install php7.4-fpm
Berikut perintah penting Apache
// enable disable modul
sudo a2enmod php7.3
sudo a2dismod php7.3
// sisten control restart
sudo service apache2 restart
Terimakasih 🙂