Drush is a command-line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those who spend their working hours hacking away at the command prompt. Let us see the steps to install Drush and make it available for all the suers in the servers.
The following commands should do it.
curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer ln -s /usr/local/bin/composer /usr/bin/composer git clone https://github.com/drush-ops/drush.git /usr/local/src/drush cd /usr/local/src/drush git checkout 7.0.0-alpha5 #or whatever version you want. ln -s /usr/local/src/drush/drush /usr/bin/drush composer install drush --version
You may come across following issues while executing the above commands:
1) If Drush cannot find an autoloaded class, run “composer self-update
". This has been explained in my previous post :
2) While cloning the drush into the drush folder using git command, you may see
root@rothchild [~]# git clone https://github.com/drush-ops/drush.git /usr/local/src/drush
-bash: git: command not found
Just install git by typing “yum install git“. It should do the trick.
All izz well!!!! Have a Great Day !!!!!