Installing Drush on Debian server (cloudscale.ch)

This post is about:

  • Drush 8.0.1
  • Debian 8.2

Tested on cloudscale.ch.

Prerequisites:

Make sure you have Git installed.

sudo apt-get update
sudo apt-get install git

Make sure you have cURL installed.

sudo apt-get update
sudo apt-get install curl

0. ssh into your Debian server

1. Update packages:

sudo apt-get update && sudo apt-get upgrade

2. Install Composer globally:

curl -sS https://getcomposer.org/installer | php

2.1 Move the composer.phar file to /usr/local/bin/, so that it can be accessed from any directory:

sudo mv composer.phar /usr/local/bin/composer

2.2 Verify installation:

composer --version

3. Install Drush globally:

3.1 Download Drush 8.0.1

wget https://github.com/drush-ops/drush/releases/download/8.0.1/drush.phar

3.2 Verify installation:

php drush.phar core-status

3.3 Move drush.phar to /usr/bin, so that it can be accessed from any directory:

chmod +x drush.phar
sudo mv drush.phar /usr/local/bin/drush

This will only work if $PATH contains /usr/local/bin. To check if it does:

echo $PATH

3.4 Enable completion and drush aliases:

drush init

3.5 Test that setup works:

drush

 

Other posts in the series: