How to properly install drush on Ubuntu 10.04
Despite it is clearly noted on http://drupal.org/node/1248790 the recommended way is to download Drush from the project page and to install it manually by reading the instructions of the README.txt file, many people start executing the aptitude command given on the same page:
$ sudo apt-get install drush
and the subsequent commands like
$ drush --version
$ drush dl drush
give you no joy since the official Ubuntu repositories contain very much outdated version of drush, which can not neither update itself nor display its version.
So the best way to have most up-to-date version of drush on your Ubuntu 10.04 server would be running:
$ cd /opt
$ wget http://ftp.drupal.org/files/projects/drush-7.x-5.0.tar.gz (<--get the last version on http://drupal.org/project/drush)
$ tar xzf drush-7.x-5.0.tar.gz
and as README files says choose one of the following two methods:
a) create a symbolic link to the Drush executable in a directory that is
already in your PATH, e.g.:
$ ln -s /path/to/drush/drush /usr/bin/drush
b) explicitly add the Drush executable to the PATH variable which is defined
in the the shell configuration file called .profile, .bash_profile,
.bash_aliases, or .bashrc that is located in your home folder, i.e.:
export PATH="$PATH:/path/to/drush:/usr/local/bin"
Your system will search path options from left to right until it finds a
result.
To apply your changes to your current session, either log out and then log
back in again, or re-load your bash configuration file, i.e.:
$ source .bashrc
Add new comment