How to install Composer

Install the latest Composer version

Composer command-line installation

Get a copy of Composer installer.

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

Verify file integrity.

php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

Installer verified

Install Composer to Run Localy

Run the Composer installer

php composer-setup.php --install-dir=bin --filename=composer

All settings correct for using Composer
Downloading…

Composer (version 1.4.1) successfully installed to: /var/www/html/test/webnotify/pushphp/bin/composer
Use it: php bin/composer

Remove Composer installer

php -r "unlink('composer-setup.php');"

Run

php bin/composer -V

 

Install Composer to Run globally

Run composer installer and remove it

php composer-setup.php
php -r "unlink('composer-setup.php');"

All settings correct for using Composer
Downloading…

Composer (version 1.4.1) successfully installed to: /root/composer.phar
Use it: php composer.phar

Move it with a new name to a global location

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

Run

composer -V

 


https://getcomposer.org/download/

https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx

 

apt-get install php5-gmp