The Drush Project Manager is an invaluable CLI tool for Drupal, enabling experienced Drupal administrators to perform various admin tasks via CLI that would otherwise require many clicks in the UI. In other words, just like Jelastic, it’s a massive time saver!
How to install Drush on your Jelastic Server
The recommended way to install Drush is now using Composer (the Pear channel still exists, but will likely become deprecated in future – as has already happened with many other projects). Composer is really easy to use and offers a lot of benefits over pear; not least the flexibility to have different versions of the same software co-existing on one server (pear works globally).
So first up, you’ll need to install Composer (if you haven’t already done so).
Drush installation now becomes as simple as:
-bash-4.1$ composer global require drush/drush:6.* Changed current directory to /var/www/.composer ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) - Installing drush/drush (6.3.0) Downloading: 100% Writing lock file Generating autoload files
Add Drush to your PATH
The above process installs drush to
~/.composer/vendor/drush/drush but you can use your `~/.bash_profile` once again to put it into your path so it’s nice and convenient to use:
-bash-4.1$ export PATH=$PATH:/var/www/.composer/vendor/drush/drush -bash-4.1$ echo 'export PATH=$PATH:/var/www/.composer/vendor/drush/drush' >> ~/.bash_profile
-bash-4.1$ export PATH=$PATH:/var/lib/nginx/.composer/vendor/drush/drush -bash-4.1$ echo 'export PATH=$PATH:/var/lib/nginx/.composer/vendor/drush/drush' >> ~/.bash_profile
-bash-4.1$ drush version Drush Version : 6.3.0
Drush power users might also consider expanding the `~/.bash_profile` to include some of the aliases in the scripts on the drush github page for even quicker access to the most useful drush commands.
Need More Help?
If you're still having problems, get in touch with our 24/7 support team! We'll be more than happy to help.