It requires a lot of resources, so double check if you have enough
The latest dev version to drush/ folder:
mkdir drush
cd drush
curl -sS https://getcomposer.org/installer | php
./composer.phar require drush/drush:dev-master
cd
echo "alias drush='~/drush/vendor/bin/drush'" >> .bashrc
source .bashrc
Drush 9 version
mkdir drush9
cd drush9
curl -sS https://getcomposer.org/installer | php
./composer.phar require "drush/drush:9.*"
cd
echo "alias drush9='~/drush9/vendor/bin/drush'" >> .bashrc
source .bashrc
Drush 8 version
mkdir drush8
cd drush8
curl -sS https://getcomposer.org/installer | php
./composer.phar require "drush/drush:8.*"
cd
echo "alias drush8='~/drush8/vendor/bin/drush'" >> .bashrc
source .bashrc
Drush 7 version
mkdir drush7
cd drush7
curl -sS https://getcomposer.org/installer | php
./composer.phar require "drush/drush:7.*"
cd
echo "alias drush7='~/drush7/vendor/bin/drush'" >> .bashrc
source .bashrc
Drush 6 version
mkdir drush6
cd drush6
curl -sS https://getcomposer.org/installer | php
./composer.phar require "drush/drush:6.*"
cd
echo "alias drush6='~/drush6/vendor/bin/drush'" >> .bashrc
source .bashrc
Drush 5 version
mkdir drush5
cd drush5
curl -sS https://getcomposer.org/installer | php
./composer.phar require "drush/drush:5.*"
cd
echo "alias drush5='~/drush5/vendor/bin/drush'" >> .bashrc
source .bashrc
Test versions:
drush5 --version
drush6 --version
drush7 --version
drush8 --version
drush9 --version