Official documents:
Http://docs.phpcomposer.com/00-intro.html#System-Requirements
Install on Linx:
Download the Composer executable file
Partial installation
To really get Composer, we need to do two things. First install Composer (again, which means it will be downloaded to your project):
Curl-ss Https://getcomposer.org/installer | Php
Note: If the above method fails for some reason, you can also download the installer via PHP >:
Php-r "ReadFile (' Https://getcomposer.org/installer ');" | Php
This will check some PHP settings and then download Composer.phar to your working directory. This is a binary file of Composer. This is a PHAR package (PHP archive), which is a PHP archive format that helps users perform some operations on the command line.
You can specify the installation directory for Composer by using the--install-dir option (it can be an absolute or relative path):
Curl-ss Https://getcomposer.org/installer | PHP----install-dir=bin
Global Installation
You can put this file anywhere. If you put it in the PATH directory of the system, you will be able to access it globally. In Unix-like systems, you can even use PHP without a prefix.
You can execute these commands to let composer make a global call on your system:
Curl-ss Https://getcomposer.org/installer | Php
MV Composer.phar/usr/local/bin/composer
Note: If the appeal command fails because of permission execution, use sudo again to try running the MV command.
Now just run the composer command to use composer without the need to enter PHP Composer.phar.
Global installation (on OSX via homebrew)
Composer is part of the homebrew-php project.
Brew Update
Brew Tap josegonzalez/homebrew-php
Brew Tap Homebrew/versions
Brew Install Php55-intl
Brew Install Josegonzalez/php/composer
PHP's dependency management tool composer Introduction and use