Composer is a command line based program used to manage dependencies in PHP projects.
To install Composer, first move into your /usr/local/bin directory.
cd /usr/local/bin
Once in /usr/local/bin, run the following command
curl -sS https://getcomposer.org/installer | php
Rename composer.phar
mv composer.phar composer
.phar is short for PHP Archive
Run the following command to invoke composer
composer
Now, you should see the output instructions of composer
You should be able to run composer from any directory
To start using Composer in your project, all you need is a composer.json file
Composer.json is a configuration file used in PHP projects that utilize the Composer dependency manager
Composer.json goes in the root of each project folder, as each project will have its own set of dependencies. Composer.json tells composer what to download.
For more information: