我在Mac上。我经常使用 MAMP。我对命令行很陌生,我正在尝试安装 Drush。我看到我需要先安装作曲家(根据我在 drush-ops 阅读的内容,所以我这样做了。这是我输入的命令:
my-MacBook-Pro:~ mycomputername$ curl -s https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Composer successfully installed to: /Users/myname/composer.phar
Use it: php composer.phar
my-MacBook-Pro:~ mycomputername$ mv composer.phar /usr/local/bin/composer
mv: rename composer.phar to /usr/local/bin/composer: Permission denied
my-MacBook-Pro:~ mycomputername$ sudo mv composer.phar /usr/local/bin/composer
Password:
之后我做了一个命令“composer about”来检查,我得到了一些东西,所以我知道它已经安装了。所以当我进入时:
my-MacBook-Pro:~ mycomputername$ composer global require drush/drush:6.*
Changed current directory to /Users/myname/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- 安装 drush/drush (6.2.0) 下载:100%
Writing lock file
Generating autoload files
...并做了一个“匆忙状态”,我得到了:
my-MacBook-Pro:~ mycomputername$ drush status
-bash: drush: command not found
...所以显然它已安装,但我应该能够找到它。接下来我该怎么办?我需要创建和别名还是什么?