Per 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('http://files.drush.org/drush.phar');" > drush # Or use our upcoming release: php -r "readfile('http://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 So I try it but get the following error:
[Michael@devserver ~]$ php -r "readfile('http://files.drush.org/drush.phar');" > drush [Michael@devserver ~]$ php drush core-status PHP Warning: pcntl_exec(): Error has occurred: (errno 13) Permission denied in phar:///home/Michael/drush/includes/startup.inc on line 359 Warning: pcntl_exec(): Error has occurred: (errno 13) Permission denied in phar:///home/Michael/drush/includes/startup.inc on line 359 Error has occurred executing the Drush script found at /home/Michael/drush (errno 13) Permission denied [Michael@devserver ~] So then I try running it as root.
[Michael@devserver ~]$ su - Password: [root@devserver ~]# php /home/Michael/drush core-status PHP configuration : /etc/php.ini PHP OS : Linux Drush script : /home/Michael/drush Drush version : 8.1.2 Drush temp directory : /tmp Drush configuration : Drush alias files : [root@devserver ~]# So, all is good, and I just need to install it as root? Any way I can install it as a normal user? Thanks
sudo. Similar tosudo mv drush /usr/local/bin, /usr/local/bin requiressudoto mv something into it.