Showing posts with label Application-level package managers. Show all posts
Showing posts with label Application-level package managers. Show all posts

Monday, October 3, 2016

PHP: Composer: Downloading and Installing Composer

Command:

$ wget -O composer-setup.php https://getcomposer.org/installer


Result:

--2016-10-03 17:22:22--  https://getcomposer.org/installer
Resolving getcomposer.org... 2001:41d0:a:7b19::2, 87.98.253.108
Connecting to getcomposer.org|2001:41d0:a:7b19::2|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 293630 (287K) [application/octet-stream]
Saving to: ‘composer-setup.php’

composer-setup.php         100%[=======================================>] 286.75K   185KB/s    in 1.5s  

2016-10-03 17:22:26 (185 KB/s) - ‘composer-setup.php’ saved [293630/293630]


Command:

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


Result:

Installer verified


Command:

$ php composer-setup.php


Result:

All settings correct for using Composer
Downloading 1.2.1...

Composer successfully installed to: /Users/USERNAME/composer.phar
Use it: php composer.phar