Installing composer on Linux

  • sudo apt updatesudo
  • apt install wget php-cli php-zip unzip
  • php -r “copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);”
  • HASH=”$(wget -q -O – 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;”
  • sudo php composer-setup.php –install-dir=/usr/local/bin –filename=composer
  • composer
Facebook Comments

You may also like