Install composer in Ubuntu 16.04

Install composer in Ubuntu 16.04


Step 1:
Run
$ sudo apt-get update
If this was not done before.
Step 2:
Install wget for file download in ubuntu
$ sudo apt-get install wget
Step 3:
Download the composer.phar from https://getcomposer.org/download via wget or built-in curl
$ wget https://getcomposer.org/composer.phar
or
$ curl -O https://getcomposer.org/composer.phar
** -O is capital O not Zero(0)
Step 4:
Rename composer.phar to composer
$ mv composer.phar composer
Step 5:
Make composer executable
$ chmod +x composer
Step 6:
Now composer can be run locally through
$ ./composer
But this is available where you are i.e. current directory where the composer file is.
Step 7:
Make composer available globally move it to /user/local/bin by
$ sudo mv composer /usr/local/bin
Now composer will be available anywhere by simply
$ composer

0 Komentar