全局安装 Drush
在安装 Drush 10 之前,你需要确保你的系统已经安装了 Composer,因为 Drush 10 是通过 Composer 安装的。以下是在 Unix/Linux 系统上安装 Drush 10 的步骤:
全局安装 Drush
在安装 Drush 10 之前,你需要确保你的系统已经安装了 Composer,因为 Drush 10 是通过 Composer 安装的。以下是在 Unix/Linux 系统上安装 Drush 10 的步骤:
在使用drush时,有时候我们安装多个版本的drush ,但是我们需要删除它的时候,不知道它安装在哪里,我们可以使用 whereis drush
命令来查看它具体的安装位置,
如图所示:
启用维护模式清除缓存
使用composer 安装drush
composer require drush/drush
安装Drush Launcher
wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar
我在给drupal 进行维护时,输入drush sset system.maintenance.mode 0 时出现下列错误。
sh: module:行1: 语法错误: 未预期的文件结尾
sh: `BASH_FUNC_module' 函数定义导入错误
使用 centos 7 安装时的记录过程
安装composer
方法一:
第一步,安装drush
composer require drush/drush
查看drush 是否安装成功
Execute a drush command. Run `drush help [command]` to view command-specific
help. Run `drush topic` to read even more documentation.
Execute a drush command. Run `drush help [command]` to view command-specific help. Run `drush topic` to read even more documentation.