Installing composer on Ubuntu
Well I would rather keep it simple and straight to the point in giving the steps. These are the steps that you can follow one by one to Install Composer on Ubuntu 14.04
me@my-ubuntu:/var/www/html$ php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
me@my-ubuntu:/var/www/html$ php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '41e71d86b40f28e771d4bb662b997f79625196afcca95a5abf44391188c695c6c1456e16154c75a211d238cc3bc5cb47') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
me@my-ubuntu:/var/www/html$ php composer-setup.php --install-dir=/usr/local/bin --filename=composer
me@my-ubuntu:/var/www/html$ sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
me@my-ubuntu:/var/www/html$ php /usr/local/bin/composer
me@my-ubuntu:/var/www/html/google-analytics$ composer require google/apiclient:1.*
That's it ! You are ready with Composer on your machine.
Add new comment