Global Installation of Composer (manual)

TLDR;

As described on the Composer website:

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

Manual Method

I found an easier way to globally install composer than the manual proscribed in the github readme.md. It's actually on the getcomposer.org website:

curl -s http://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/

And if you're even more lazy, like me, you can create an alias:

alias composer='/usr/local/bin/composer.phar'

This way you can invoke composer with just composer


Don't add php in the beginning. Just call composer.phar.


Actually, getcomposer.org now recommends a simpler method:

$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

Now you can just use composer without bothering with an alias or a separate sh script.

Tags:

Php

Binary