Drush can be installed in Linux or Unix systems, manually or automatically, by a package management system such as PEAR, Aptitude, Port, Homebrew, and others (depending on your distribution). Although the automatic approach offers a quick and easy way to install Drush, there are some disadvantages:
drush topic
command would not work.After this reasoning, the most effective method is installing Drush manually, as it ensures that we are installing the correct release. Installing a previous version may result in some commands used in this book being made redundant, or unexpected results from other commands.
For instructions on how to install Drush on shared hosting systems, read the contents of http://drupal.org/node/1181480.
$ echo $HOME
/home/juampy
drush-7.x-4.5.tar.gz
use the following command:$ tar -zxvf drush-7.x-4.5.tar.gz
drush/
drush/examples/
drush/examples/example.aliases.drushrc.php
...
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
$ unzip drush-7.x-4.5.zip
Archive: drush-7.x-4.5.zip
creating: drush/
creating: drush/examples/
...
drush
.$ cd /home/juampy/drush
$ chmod u+x drush
$ ./drush
Execute a drush command. Run `drush help [command]` to view command-specific help. Run `drush topic` to read even more documentation.
PATH
environment variable; so you do not have to type /home/juampy/drush/drush
every time you use it. Note that this command will ask you for your administrator password in order to proceed:$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: /usr/games:/home/juampy/local/bin: /opt/android-sdk-linux_x86/tools
$ sudo ln -s /home/juampy/drush/drush /usr/local/bin/drush
drush:
$ cd /home/juampy
$ drush
3.139.83.62