How to Install Composer on a Linux Server

By | April 6, 2019

Here comes the guide for global composer installation.

wget https://getcomposer.org/installer
--2019-04-06 18:15:55--  https://getcomposer.org/installer
Resolving getcomposer.org (getcomposer.org)... 2001:41d0:302:1100::8:104f, 54.36.53.46
Connecting to getcomposer.org (getcomposer.org)|2001:41d0:302:1100::8:104f|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 263790 (258K) [application/octet-stream]
Saving to: 'installer'

2019-04-06 18:15:56 (1.82 MB/s) - 'installer' saved [263790/263790]

Rename it to composer-setup.php

mv installed composer-setup.php

Use this command for global installation:

php composer-setup.php --install-dir=/bin --filename=composer

All done! Now you can run composer from command line by simply typing composer.

Leave a Reply

Your email address will not be published. Required fields are marked *