2

i want to install drush on my server .

I want to install drush-toolbox project globaly on my linux server box so all users can use it

My server: Cpanel , Litespeed , Cagefs , Cloudlinux (centos 6)

my drupal version 7.5x

I try this article CLick here and after run this command:

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

I get this error : The installation directory "/root" is not writable

I run this command : chmod 640 /root and chmod 644 /root but give same error (not writable)

Please help me.Is any guidance for me?

  • php -m I not see any module called "drush". That is normal. Drush is not a php module. It is a standalone php package that requires php to run. Not an extension on php. – Neograph734 Feb 12 '17 at 12:41
  • but when I run drush commands have no any result.how i can test install drush is correctly? – omiti Feb 13 '17 at 6:12
  • Please Help me for Install Drush on my linux server with cloudlinux and LSWS. – omiti Feb 14 '17 at 6:24
  • I give "/root directory is not writable" when drush composer want to be installed by php.please help me. – omiti Feb 15 '17 at 6:17
  • If you tried to chmod the root folder I suggest you first learn some linux Server maintenance tutorials or something... – Neograph734 Feb 15 '17 at 7:02
1

The composer method for installing drush works, but is outdated. Use the drush documentation for the right instructions: http://docs.drush.org/en/master/install/

# Download latest stable release using the code below or browse to github.com/drush-ops/drush/releases.
php -r "readfile('https://s3.amazonaws.com/files.drush.org/drush.phar');" > drush
# Or use our upcoming release: php -r "readfile('https://s3.amazonaws.com/files.drush.org/drush-unstable.phar');" > drush

# Test your install.
php drush core-status

# Make `drush` executable as a command from anywhere. Destination can be anywhere on $PATH.
chmod +x drush
sudo mv drush /usr/local/bin

# Optional. Enrich the bash startup file with completion and aliases.
drush init
  • thank you,I tried this manual previously but it was unsuccesssful.I tried this again.after every command line which i send no have any results.this is my command: -bash-4.1# php -r "readfile('https://s3.amazonaws.com/files.drush.org/drush.phar');" > drush -bash-4.1# php drush core-status -bash-4.1# chmod +x drush -bash-4.1# sudo mv drush /usr/local/bin -bash-4.1# drush init -bash: /root/drush/drush: No such file or directory -bash-4.1# drush init -bash: /root/drush/drush: No such file or directory -bash-4.1# – omiti Feb 15 '17 at 11:28
  • Try opening a new Shell after moving the file. – Neograph734 Feb 15 '17 at 11:30
  • I am not a proffessional in linux management.You can help me by write codes and steps here? – omiti Feb 15 '17 at 11:31
  • 1
    Close the Shell or SSH connection and open it again – Neograph734 Feb 15 '17 at 11:33
  • I retype steps code and after first command and mv command close and reopen ssh , but php drush core-status have no any results and drush init command give me this error : ** /root/drush/drush: No such file or directory ** . @Neograph734 thank you for your asnwers – omiti Feb 15 '17 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.