要升級 Ubuntu 上的 PHP-FPM 版本,請按照以下步驟操作:
sudo apt-get update
apt-cache search php-fpm | grep -E 'php[0-9]+\.fpm'
sudo apt-get install php7.4-fpm
sudo systemctl status php7.4-fpm
sudo systemctl restart php7.4-fpm
php-fpm -v
請注意,根據你的應用程序需求,你可能需要安裝不同的 PHP 版本。只需將上述命令中的 php7.4-fpm
替換為你所需的版本即可。
此外,如果你使用的是自定義的 PHP-FPM 配置文件,請確保在新版本安裝后檢查并更新配置文件中的任何不兼容設置。