Follow the steps to install composer on windows or mac environment.
Before following these steps you must install PHP already as composer is dependent on PHP.
Step1: Download the installer to the current directory
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
Step 2: Verify the installer SHA-384
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e5325b19b381bfd88ce90a5ddb7823406b2a38cff6bb704b0acc289a09c8128d4a8ce2bbafcd1fcbdc38666422fe2806') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Step 3: Run the installer
php composer-setup.php
Step 4: Remove the installer
php -r "unlink('composer-setup.php');"
Step 5: Make composer globally available on your machine
mv composer.phar /usr/local/bin/composer
Top comments (0)