Monday, November 16, 2015

How to install composer on Lubuntu


If you are a web developer and you are developing with php, you will be familiar with composer, composer is a package management tool for php. In this article i will show you how to install composer on lubuntu.

First of all you will need internet connection to do this because we are going to download the composer binary from getcomposer.org, to do that we need command line program called curl. Curl doesn't come with lubuntu installation, so you need to install separately.

To install curl on lubuntu, simply run this command:

sudo apt-get install curl

Next after curl installed on your lubuntu, there is still one more thing left before we can download the composer binary and that is the php itself, php need to be installed globally on your lubuntu (means php is accessible from anywhere).

To install php globally, simply run this command:

sudo apt-get install php5-cli

And finally you can go ahead download composer binary, to download composer binary, simply run this command:

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

You can see that composer.phar is now available on lubuntu, but we are not finish yet, we need to make composer accessible globally from anywhere inside lubuntu, to do that you run this command:

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

Now you can try to type 'composer' from the terminal and see if it's working.

composer

~ good luck ~

No comments:

Post a Comment