Having Drush installed server wide is handy, especially if you have several users logging on the server. Use the appropriate url for the tarball, you can find the latest release of drush at http://drupal.org/project/drush. The lines below assume you have sudo access. If you don't, please check the Drush documentation to learn how to install Drush. The commands below have been tested successfully on Debian, Ubuntu, CentOS and should work for most *NIX systems.
sudo wget --quiet -O - http://ftp.drupal.org/files/projects/drush-7.x-5.6.tar.gz | sudo tar -zxf - -C /usr/local/share
sudo ln -s /usr/local/share/drush/drush /usr/local/bin/drush
sudo drush
The last line is for Drush to auto download the required library. If it displays a list of drush command, it means drush was installed successfully!
Some machines might not have the right folders created, so either update the paths above to match your environment, or create them beforehand:
sudo mkdir /usr/local/share/
sudo mkdir /usr/local/bin/
Comments
Siavash (not verified)
Sat, 27/02/2010 - 19:00
Permalink
Awesome!
Great quick tutorial, thanks!
The wget line doesn't paste well though, maybe remove the ?
Stéphane
Sat, 27/02/2010 - 19:05
Permalink
thanks for pointing this out,
thanks for pointing this out, I've fixed the input format, should work now.
mariomaric (not verified)
Mon, 05/04/2010 - 05:49
Permalink
Download & unpack shortcut?
Hi.
Maybe you could replace first four lines with this piped command:
sudo wget --quiet -O - http://ftp.drupal.org/files/projects/drush-All-Versions-HEAD.tar.gz | tar -zxf - -C /usr/local/shareThose who know something about *NIX will understand what is happening, and to those who are not so familiar you will spare typing four commands. ;)
Cheers.
Stéphane
Fri, 03/06/2011 - 16:19
Permalink
Thanks @mariomaric, I've
Thanks @mariomaric, I've updated the original code with your suggestion. We're down to three command lines now!
loopduplicate (not verified)
Thu, 07/04/2011 - 04:03
Permalink
drush on Hostmonster
For anyone who wants to install Drush on Hostmonster, use the instructions above but don't use 'sudo'. You can download the drush tar ball into a folder called /home/username/drush and after extracting it, then symlink to it using the command: ln -s /home/username/drush/drush /home/username/bin/drush
This works because any program that is symlinked to your /home/username/bin folder can run from any directory.
Anyway, I suppose this is basic but no one else on the web made it this clear so, here it is.
Add new comment