安装扩展:sudo pecl install redis开启开发者debug模式: ini_set(“display_errors”,“On”);error_reporting(E_ALL);error_reporting(E_ALL); 如果php使用apt install 安装的,则扩展也用apt install;否则都使用源码的方式。