Need to know how to install Drush on your Ubuntu Machine? Learn how to do it now.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our customers to perform Software Installation tasks.
Now, let us look into how to install Drush on your Linux Machine.
Steps to install Drush on Ubuntu and Debian Server?
Drush is a command line shell and Unix scripting interface for Drupal. It makes management of your Drupal web sites easy and in an efficient way.
To install Drush, you need to following the steps below;
i. Dependencies Installation
To start with the installation of Drush, you need to install its dependencies. But first, update the system by running the command below;
sudo apt-get update && sudo apt-get upgrade
After the update process, run the command below to install the dependencies;
sudo apt-get install php-xml, zip
Next, install curl with the command below;
apt-get install curl php7-cli git
ii. Composer installation
To install Composer, run the command below;
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
iii. Drush Installation
To install the latest version of Drush, run the command below;
composer global require drush/drush
Alternatively, you can choose to install a particular version of Drush, lets say version 8, then run the command below;
composer global require drush/drush:8
iv. Adding Drush Directory to the Path
Now open the file ".bashrc" and add the following information into it;
#path for Drush
Then run source command to recognize the changes made;
v. Verifying the Drush Installation
You can verify Drush by running the command below;