Skip to content

Instantly share code, notes, and snippets.

@thatal
Last active May 24, 2021 18:55
Show Gist options
  • Save thatal/47d33bcaa8b339c5794463e3b1b7112d to your computer and use it in GitHub Desktop.
Save thatal/47d33bcaa8b339c5794463e3b1b7112d to your computer and use it in GitHub Desktop.
new version of Composer installation on linux machine
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
HASH=`curl -sS https://composer.github.io/installer.sig`
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
#check your installation directory where all executables are stored. eg /usr/bin
sudo php composer-setup.php --install-dir=/usr/bin --filename=composer
php -r "unlink('composer-setup.php');"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment