• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Installing Drush on Onyx/CentOS advice

Justin Buckkley

New Pleskian
Hi all,

I have a few Drupal developers that have asked in I could install Drush (drush-8.1.10-1.el7.noarch.rpm CentOS 7 Download).

I'm not familiar with it myself, but my first 2 thoughts were:

1. Install globally as root, and make it available in chrooted environment.
2, Add php, etc. to chrooted and let them install Drush per subscription.

Does anyone have experience with Drush on Plesk/CentOS in a shared hosting setup? And advice on best practice?

Thanks!
 
Drush is not supported in Plesk and is not planned to be implemented. It can be installed separately using instructions from manufacturer website http://www.drush.org, but support for it will not be provided by Plesk.

As this functionality is not implemented in Plesk yet, vote for a feature: Drush for Drupal
The top-ranked suggestions are likely to be included in the next versions of Plesk.
 
Please provide a guide as centos 7 + plesk is only using php 5.4.16 as OS Version.

The last version of plesk would require 5.6x or higher to run.

How to tell Drush to actually use the Plesk PHP version for the installed domain?
 
So far I only managed to get Drush 8 working for Drupal 6 + Drupal 7 to be pointing it to Plesk PHP 7.2.

composer global require drush/drush
echo 'export PATH="$HOME/.config/composer/vendor/bin:$PATH"' >> ~/.bashrc
echo 'export DRUSH_PHP=/opt/plesk/php/7.2/bin/php' >> ~/.bashrc
source ~/.bashrc


Unfortunately Drupal 8 requires Drush 9 :-(

For some reason it still used the original Centos OS 5.4.45 php Verison that will ive en error

with this i get it installed

/opt/plesk/php/7.2/bin/php /usr/lib64/plesk-9.0/composer.phar require drush/drush 9

If i run

/opt/plesk/php/7.2/bin/php /root/.config/composer/vendor/bin/drush version

I get version Drush version : 9.7.0

But if i run it again in an Drupal 8 install folder I get this error

PHP Parse error: syntax error, unexpected 'function' (T_FUNCTION), expecting identifier (T_STRING)..........


As of now i dont know if it DRUSH or Composer that is producting the error as Composer gives the same error.

If anyone can help i would appriciate it.
 
Is there anyone that might be able to help with getting global install root DRUSH to also work for Domain SSH users.

Basically like composer is working for all ssh users.
 
Back
Top