How to install Composer in Ubuntu

Composer is a dependency manager tool for PHP programming language which is quite useful for PHP programmers and make the coding process easier. Compose more or less likes Maven that manage dependencies automatically.

Installation process of compose is quite easy and will not take more than 5 minutes to set it up. In order to install it, first you need to install curl and php5-cli packages with this command,

$ sudo apt-get install curl
$ sudo apt-get install php5-cli

After that you need to download composer package in your PC with the following command,

$ curl -sS https://getcomposer.org/installer | php

And finally move the file to /usr/local/bin/composer with this command,

$ sudo mv composer.phar /usr/local/bin/composer

Now Composer has been installed and you are good to go.

Happy coding!

Leave a Reply