Suppose: if your project depends on libraries and some of those lib depend on other libraries

Composer: This enables you to declare the libraries you depend on

Installation :

There are two ways to install this package on locally and globally.

Locally:

Can install composer on locally execute below command line,

Do you need to install Composer at a specific path by using the --install-dir option, also want to rename the file while installing use --filename option:
 

# curl -sS https://getcomposer.org/installer | php -- --install-dir=bin --filename=composer

Globally :

Do you want to install globally in two ways,

Download the composer and install it
 
# curl -sS https://getcomposer.org/installer | php 

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

or
 
# curl -sS 'https://getcomposer.org/installer' | php -- --install-dir=/usr/local/bin --filename=composer

Output:


#!/usr/bin/env php
All settings correct for using Composer
Downloading...

Composer successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer


Finally check the installed versions,
 
# composer  -V       
Composer version 1.0-dev (f1aa655e6113e0efa979b8b09d7951a762eaa04c) 2015-08-20 11:59:54