How to Install Composer With Drush Globally in Centos , ubuntu 18.x

 Install Composer With Drush Globally in Centos

Here is the process to install composer with drush globally in centos, ubuntu 18.x:

Go to the temp folder using this command

# cd  /tmp

Install composer with drush

We need to download composer to run that command

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

composer installtion centos

We need to move composer.phar file to /usr/local/bin/composer

Run the command below

# sudo mv composer.phar /usr/local/bin/composer

composer.phar

Then try to run command composer

install drush through composer

# composer

Now composer installed then install drush through composer

Select the version you want to install

    To Install drush 8.0 type the command

# composer  global require drush/drush:8.x

install composer global

To Install drush 7.0 type the command

# composer global require drush/drush:7.x

Add drush to your path:-

# echo export PATH="$HOME/.config/composer/vendor/bin:$PATH” >> ~/.bashrc 

composer-vender                                                                

Type the command to effect immediately

# source ~/.bashrc

composer effect

To Check drush install correctly

# drush version

# drush status

drush version

NOW DRUSH INSTALLED READY TO USE

If Found any error Like Runtime exception Click Here to resolve

Blog type: 

Add new comment

Authored By

Sandeep Gurjar

Hy all, This is Sandeep Gurjar am the founder of hostingride.in. I am a Redhat Certified Engineer (RHCE) / AWS Solutions Architect-Associate and working as an system administrator since 2016.

Follow us on

Facebook​  Twitter  LinkedIn  Google+