Installing Composer

Problem

You want to install Composer.

You know Laravel uses Composer extensively for it's package management, but do not have Composer installed on your machine.

Solution

Install it with two simple commands.

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

Verify it's installed by checking the version.

laravel:~$ composer --version

You should see something like:

Composer version d3ff302194a905be90136fd5a29436a42714e377

Discussion

Composer is a dependency manager for PHP.

Composer allows you to declare libraries your PHP project requires and automatically installs and maintains these libraries for you.

The above instructions are for Linux, specifically Ubuntu 13.04. If you're running a different operating system, visit getcomposer.org and follow the instructions for your operating system.

comments powered by Disqus